Skip to content

Commit

Permalink
Addressing all comments and renaming the test file so that it comes a…
Browse files Browse the repository at this point in the history
…t the first
  • Loading branch information
chudur-budur committed Feb 10, 2023
1 parent d254cc1 commit bd9a38b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions numba_dpex/core/passes/passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def run_pass(self, state):

@register_pass(mutates_CFG=False, analysis_only=True)
class QualNameDisambiguationLowering(NativeLowering):
"""Qualified name disambiguarion lowering pass
"""Qualified name disambiguation lowering pass
If there are multiple @func decorated functions exist inside
another @func decorated block, the numba compiler machinery
Expand All @@ -409,9 +409,6 @@ class has been inherited.

_name = "qual-name-disambiguation-lowering"

def __init__(self):
NativeLowering.__init__(self)

def run_pass(self, state):
qual_name = state.func_id.func_qualname
state.func_id.func_qualname = state.func_id.unique_name
Expand Down
5 changes: 2 additions & 3 deletions numba_dpex/core/pipelines/kernel_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from numba.core.compiler import CompilerBase
from numba.core.compiler_machinery import PassManager
from numba.core.typed_passes import ( # We are using FreevarDisambiguationLowering instead; numba-dpex github issue: 898; NativeLowering,
from numba.core.typed_passes import (
AnnotateTypes,
IRLegalization,
NopythonRewrites,
Expand Down Expand Up @@ -141,8 +141,7 @@ def define_nopython_lowering_pipeline(state, name="dpex_kernel_lowering"):
# lower
# NativeLowering has some issue with freevar ambiguity,
# therefore, we are using QualNameDisambiguationLowering instead
# numba-dpex github issue: 898
# pm.add_pass(NativeLowering, "native lowering")
# numba-dpex github issue: https://github.com/IntelPython/numba-dpex/issues/898
pm.add_pass(
QualNameDisambiguationLowering,
"numba_dpex qualified name disambiguation",
Expand Down

0 comments on commit bd9a38b

Please sign in to comment.