Skip to content

Commit 78e0634

Browse files
committed
Reinstante WAR for early 12.x CUDA toolkits
1 parent ec52710 commit 78e0634

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

numba_cuda/numba/cuda/cudadrv/driver.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2491,11 +2491,14 @@ def add_data(self, data, kind, name):
24912491

24922492
def _get_linker_options(self, ptx):
24932493
# Some linker flags are only valid/required if LTOIR object code is present.
2494+
# Passing None or True is a WAR for an issue in earlier versions of the
2495+
# 12.x CUDA toolkit
2496+
lto = True if self._has_ltoir else None
24942497
options = LinkerOptions(
24952498
max_register_count=self.max_registers,
24962499
lineinfo=self.lineinfo,
24972500
arch=self.arch,
2498-
link_time_optimization=self._has_ltoir,
2501+
link_time_optimization=lto,
24992502
ptx=self._has_ltoir and ptx,
25002503
)
25012504
return options

0 commit comments

Comments
 (0)