File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2022 Intel Corporation
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ from numba .core .compiler import CompilerBase , DefaultPassBuilder
6+
7+ from numba_dpex .parfor_diagnostics import ExtendedParforDiagnostics
8+
9+ from .passbuilder import PassBuilder
10+
11+
12+ class Compiler (CompilerBase ):
13+ """The DPEX compiler pipeline."""
14+
15+ def define_pipelines (self ):
16+ # this maintains the objmode fallback behaviour
17+ pms = []
18+ self .state .parfor_diagnostics = ExtendedParforDiagnostics ()
19+ self .state .metadata [
20+ "parfor_diagnostics"
21+ ] = self .state .parfor_diagnostics
22+ if not self .state .flags .force_pyobject :
23+ pms .append (PassBuilder .define_nopython_pipeline (self .state ))
24+ if self .state .status .can_fallback or self .state .flags .force_pyobject :
25+ pms .append (
26+ DefaultPassBuilder .define_objectmode_pipeline (self .state )
27+ )
28+ return pms
You can’t perform that action at this time.
0 commit comments