Skip to content
Merged
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
8 changes: 4 additions & 4 deletions cuda_core/cuda/core/experimental/_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ def __post_init__(self):
if self.device_code_optimize is not None:
self._formatted_options.append(f"--dopt={'on' if self.device_code_optimize else 'off'}")
if self.ptxas_options is not None:
self._formatted_options.append("--ptxas-options")
opt_name = "--ptxas-options"
if isinstance(self.ptxas_options, str):
self._formatted_options.append(self.ptxas_options)
self._formatted_options.append(f"{opt_name}={self.ptxas_options}")
elif is_sequence(self.ptxas_options):
for option in self.ptxas_options:
self._formatted_options.append(option)
for opt_value in self.ptxas_options:
self._formatted_options.append(f"{opt_name}={opt_value}")
if self.max_register_count is not None:
self._formatted_options.append(f"--maxrregcount={self.max_register_count}")
if self.ftz is not None:
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 @@ -43,6 +43,8 @@ def ptx_code_object():
ProgramOptions(diag_error=1234, diag_suppress=1234),
ProgramOptions(diag_error=[1234, 1223], diag_suppress=(1234, 1223)),
ProgramOptions(diag_warn=1000),
ProgramOptions(std="c++11", ptxas_options=["-v"]),
ProgramOptions(std="c++11", ptxas_options=["-v", "-O2"]),
],
)
def test_cpp_program_with_various_options(init_cuda, options):
Expand Down
Loading