Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions cuda_core/cuda/core/experimental/_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ class ProgramOptions:
split_compile: int | None = None
fdevice_syntax_only: bool | None = None
minimal: bool | None = None
numba_debug: bool | None = None # Custom option for Numba debugging

def __post_init__(self):
self._name = self.name.encode()
Expand Down Expand Up @@ -418,6 +419,8 @@ def __post_init__(self):
self._formatted_options.append("--fdevice-syntax-only")
if self.minimal is not None and self.minimal:
self._formatted_options.append("--minimal")
if self.numba_debug:
self._formatted_options.append("--numba-debug")

def _as_bytes(self):
# TODO: allow tuples once NVIDIA/cuda-python#72 is resolved
Expand Down
2 changes: 2 additions & 0 deletions cuda_core/tests/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def ptx_code_object():
[
ProgramOptions(name="abc"),
ProgramOptions(device_code_optimize=True, debug=True),
ProgramOptions(device_code_optimize=True, debug=True, numba_debug=True),
ProgramOptions(relocatable_device_code=True, max_register_count=32),
ProgramOptions(ftz=True, prec_sqrt=False, prec_div=False),
ProgramOptions(fma=False, use_fast_math=True),
Expand Down Expand Up @@ -210,6 +211,7 @@ def test_cpp_program_with_various_options(init_cuda, options):
options = [
ProgramOptions(max_register_count=32),
ProgramOptions(debug=True),
ProgramOptions(debug=True, numba_debug=True),
ProgramOptions(lineinfo=True),
ProgramOptions(ftz=True),
ProgramOptions(prec_div=True),
Expand Down
Loading