Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass all parfor kernel array arg types as USMNdArray.
- Previously, any dpnp.ndarray objects used as an argument in a parfor was a numba_dpex.core.types.DpnpNdArray. The commit changes that and casts all dpnp.ndarray arguments of a parfor to numba_dpex.core.types.USMNdArray. The reason for the change is as follows: Although, DpnpNdArray derives from USMNdArray the two types use different data models. USMNdArray uses the numba_dpex.core.datamodel.models.ArrayModel data model that defines all CPointer type members in the GLOBAL address space. The DpnpNdArray uses Numba's default ArrayModel that does not define pointers in any specific address space. For OpenCL HD Graphics devices, defining a kernel function (spir_kernel calling convention) with pointer arguments that have no address space qualifier causes a run time crash. By casting the argument type for parfor arguments from DpnpNdArray type to the USMNdArray type the generated kernel always has an address space qualifier, avoiding the issue on OpenCL HD graphics devices.
- Loading branch information