File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 14
14
from numba .core .target_extension import CPU , target_registry
15
15
16
16
from numba_dpex .core .datamodel .models import _init_dpjit_data_model_manager
17
+ from numba_dpex .dpctl_iface import dpctlimpl
17
18
from numba_dpex .dpnp_iface import dpnp_ufunc_db
18
19
19
20
@@ -69,6 +70,7 @@ def load_additional_registries(self):
69
70
Load dpjit-specific registries.
70
71
"""
71
72
self .install_registry (dpex_function_registry )
73
+ self .install_registry (dpctlimpl .registry )
72
74
73
75
# loading CPU specific registries
74
76
super ().load_additional_registries ()
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2024 Intel Corporation
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from numba .core .imputils import Registry
6
+
7
+ registry = Registry ("dpctlimpl" )
8
+
9
+ lower_builtin = registry .lower
10
+ lower_getattr = registry .lower_getattr
11
+ lower_getattr_generic = registry .lower_getattr_generic
12
+ lower_setattr = registry .lower_setattr
13
+ lower_setattr_generic = registry .lower_setattr_generic
14
+ lower_cast = registry .lower_cast
15
+ lower_constant = registry .lower_constant
Original file line number Diff line number Diff line change @@ -293,13 +293,15 @@ def load_additional_registries(self):
293
293
"""
294
294
# pylint: disable=import-outside-toplevel
295
295
from numba_dpex import printimpl
296
+ from numba_dpex .dpctl_iface import dpctlimpl
296
297
from numba_dpex .dpnp_iface import dpnpimpl
297
298
from numba_dpex .ocl import mathimpl , oclimpl
298
299
299
300
self .insert_func_defn (oclimpl .registry .functions )
300
301
self .insert_func_defn (mathimpl .registry .functions )
301
302
self .insert_func_defn (dpnpimpl .registry .functions )
302
303
self .install_registry (printimpl .registry )
304
+ self .install_registry (dpctlimpl .registry )
303
305
self .install_registry (spirv_registry )
304
306
# Replace dpnp math functions with their OpenCL versions.
305
307
self .replace_dpnp_ufunc_with_ocl_intrinsics ()
You can’t perform that action at this time.
0 commit comments