Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
67759e9
[Refactor][NFC] Vendor-in core Numba analysis utils for CUDA-specific…
atmnp Aug 27, 2025
2daa3bf
[Refactor][NFC] Vendor-in core Numba byteflow utils for CUDA-specific…
atmnp Aug 27, 2025
e8ade49
add python 3.9 support back, there's no functional change that needs …
atmnp Aug 27, 2025
c4b09f1
fix dangling import to upstream utils
atmnp Aug 27, 2025
fcf02fc
fix import of unsupported bytecode error
atmnp Aug 27, 2025
49615ee
add support back for python 3.9
atmnp Aug 27, 2025
48adce8
adds tests
atmnp Aug 28, 2025
4f0e444
update tests to target cuda
atmnp Aug 29, 2025
510c8b4
revert tests to run on python 3.9
atmnp Aug 29, 2025
9d45d13
don't run analysis pass tests in sim + remove phi tests that test
atmnp Aug 29, 2025
fe9199d
wip: updating imports, geting failures
atmnp Sep 2, 2025
24cfe82
wip: removed dangling imports, need to port tests to gpu maybwe
atmnp Sep 2, 2025
d020402
remove tests with pipeline_class usage, unsupported in numba-cuda
atmnp Sep 2, 2025
66e496e
skip analysis tests again on cudasim
atmnp Sep 2, 2025
3431124
fix dangling ir_utils import
atmnp Sep 2, 2025
fae1e67
re-add python 3.9 test fix
atmnp Sep 2, 2025
119738b
fix infinite_loop test to work on python 3.9
atmnp Sep 2, 2025
93ade5c
remove unsupported/untested tests
atmnp Sep 8, 2025
516d306
port tests to gpu
atmnp Sep 23, 2025
34dbcd7
Merge branch 'main' into atmn/vendor-in-analysis
atmnp Sep 24, 2025
3cd6e3a
Merge branch 'main' into atmn/vendor-in-analysis
atmnp Oct 3, 2025
a0c1c47
Merge branch 'main' into atmn/vendor-in-analysis
atmnp Oct 3, 2025
349b43a
Merge branch 'main' into atmn/vendor-in-analysis
atmnp Oct 7, 2025
877684c
xfail two tests, add global skips on analysis tests for cudasim
atmnp Oct 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
444 changes: 441 additions & 3 deletions numba_cuda/numba/cuda/core/analysis.py

Large diffs are not rendered by default.

2,346 changes: 2,346 additions & 0 deletions numba_cuda/numba/cuda/core/byteflow.py

Large diffs are not rendered by default.

989 changes: 989 additions & 0 deletions numba_cuda/numba/cuda/core/controlflow.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions numba_cuda/numba/cuda/core/inline_closurecall.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,9 @@ def inline_closure_call(

# first, get the IR of the callee
if isinstance(callee, pytypes.FunctionType):
from numba.cuda.core import compiler
from numba.cuda.compiler import run_frontend

callee_ir = compiler.run_frontend(callee, inline_closures=True)
callee_ir = run_frontend(callee, inline_closures=True)
else:
callee_ir = get_ir_of_code(glbls, callee_code)

Expand Down
4 changes: 2 additions & 2 deletions numba_cuda/numba/cuda/core/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
INPLACE_BINOPS_TO_OPERATORS,
)
from numba.cuda.utils import _lazy_pformat
from numba.core.byteflow import Flow, AdaptDFA, AdaptCFA, BlockKind
from numba.cuda.core.byteflow import Flow, AdaptDFA, AdaptCFA, BlockKind
from numba.cuda.core.unsafe import eh
from numba.cpython.unsafe.tuple import unpack_single_tuple


if PYVERSION in ((3, 12), (3, 13)):
# Operands for CALL_INTRINSIC_1
from numba.core.byteflow import CALL_INTRINSIC_1_Operand as ci1op
from numba.cuda.core.byteflow import CALL_INTRINSIC_1_Operand as ci1op
elif PYVERSION in ((3, 9), (3, 10), (3, 11)):
pass
else:
Expand Down
6 changes: 3 additions & 3 deletions numba_cuda/numba/cuda/core/ir_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import warnings

import numba
from numba.core import types, ir, analysis
from numba.core import types, ir
from numba.cuda import typing
from numba.cuda.core import postproc, rewrites, config
from numba.cuda.core import analysis, postproc, rewrites, config
from numba.core.typing.templates import signature
from numba.core.analysis import (
from numba.cuda.core.analysis import (
compute_live_map,
compute_use_defs,
compute_cfg_from_blocks,
Expand Down
5 changes: 3 additions & 2 deletions numba_cuda/numba/cuda/core/ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
from collections import defaultdict

from numba.cuda import config
from numba.core import ir, ir_utils, errors
from numba.core import ir, errors
from numba.cuda.core import ir_utils
from numba.cuda.utils import OrderedSet, _lazy_pformat
from numba.core.analysis import compute_cfg_from_blocks
from numba.cuda.core.analysis import compute_cfg_from_blocks


_logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion numba_cuda/numba/cuda/core/untyped_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from numba.cuda.misc.special import literal_unroll
from numba.cuda.core.analysis import dead_branch_prune
from numba.core.analysis import (
from numba.cuda.core.analysis import (
rewrite_semantic_constants,
find_literally_calls,
compute_cfg_from_blocks,
Expand Down
2 changes: 1 addition & 1 deletion numba_cuda/numba/cuda/lowering.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)
from numba.cuda.core.funcdesc import default_mangler
from numba.cuda.core.environment import Environment
from numba.core.analysis import compute_use_defs, must_use_alloca
from numba.cuda.core.analysis import compute_use_defs, must_use_alloca
from numba.cuda.misc.firstlinefinder import get_func_body_first_lineno
from numba import version_info

Expand Down
22 changes: 21 additions & 1 deletion numba_cuda/numba/cuda/simulator/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,25 @@
compile_all = None


def run_frontend(func, inline_closures=False, emit_dels=False):
def run_frontend(func):
pass


class DefaultPassBuilder(object):
@staticmethod
def define_nopython_lowering_pipeline(state, name="nopython_lowering"):
pass

@staticmethod
def define_typed_pipeline(state, name="typed"):
pass


class CompilerBase:
def __init__(
self, typingctx, targetctx, library, args, return_type, flags, locals
):
pass


PassManager = None
4 changes: 4 additions & 0 deletions numba_cuda/numba/cuda/simulator/tests/support.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause

MemoryLeakMixin = None
Loading