Skip to content

Commit

Permalink
remove redundant check for config assembly, and enable lto by default
Browse files Browse the repository at this point in the history
  • Loading branch information
isVoid authored and gmarkall committed Oct 22, 2024
1 parent d227fcb commit 88bdde0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions numba_cuda/numba/cuda/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,17 @@ def get_cubin(self, cc=None):
linker = driver.Linker.new(
max_registers=self._max_registers,
cc=cc,
additional_flags=["-ptx"]
additional_flags=["-ptx"],
lto=True
)
self._link_all(linker, cc)
ptx = linker.get_linked_ptx().decode('utf-8')

if config.DUMP_ASSEMBLY:
print(("ASSEMBLY (AFTER LTO) %s" % self._name).center(80, '-'))
print(ptx)
print('=' * 80)
print(("ASSEMBLY (AFTER LTO) %s" % self._name).center(80, '-'))
print(ptx)
print('=' * 80)

linker = driver.Linker.new(max_registers=self._max_registers, cc=cc)
linker = driver.Linker.new(max_registers=self._max_registers, cc=cc, lto=True)
self._link_all(linker, cc)
cubin = linker.complete()

Expand Down

0 comments on commit 88bdde0

Please sign in to comment.