66numba_dpex.experimental module.
77"""
88
9+ from numba .core import types
910from numba .core .datamodel import DataModelManager , models
1011from numba .core .extending import register_model
1112
1213import numba_dpex .core .datamodel .models as dpex_core_models
14+ from numba_dpex .core .types import Array , DpctlSyclQueue , DpnpNdArray , USMNdArray
1315
1416from .types import KernelDispatcherType
1517
@@ -26,7 +28,20 @@ def _init_exp_data_model_manager() -> DataModelManager:
2628 """
2729
2830 dmm = dpex_core_models .dpex_data_model_manager .copy ()
31+ dmm .register (types .CPointer , dpex_core_models .GenericPointerModel )
32+ dmm .register (Array , dpex_core_models .USMArrayModel )
2933
34+ # Register the USMNdArray type to USMArrayModel in numba_dpex's data model
35+ # manager. The dpex_data_model_manager is used by the DpexKernelTarget
36+ dmm .register (USMNdArray , dpex_core_models .USMArrayModel )
37+
38+ # Register the DpnpNdArray type to USMArrayModel in numba_dpex's data model
39+ # manager. The dpex_data_model_manager is used by the DpexKernelTarget
40+ dmm .register (DpnpNdArray , dpex_core_models .USMArrayModel )
41+
42+ # Register the DpctlSyclQueue type to SyclQueueModel in numba_dpex's data
43+ # model manager. The dpex_data_model_manager is used by the DpexKernelTarget
44+ dmm .register (DpctlSyclQueue , dpex_core_models .SyclQueueModel )
3045 return dmm
3146
3247
0 commit comments