Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Graham Markall <[email protected]>
  • Loading branch information
brandon-b-miller and gmarkall authored Aug 22, 2024
1 parent 41d85a9 commit f7939b6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions numba_cuda/numba/cuda/cudadrv/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2640,7 +2640,7 @@ def new(cls,

if linker is PyNvJitLinker:
return linker(max_registers, lineinfo, cc, lto, additional_flags)
elif additional_flags or lto:
elif additional_flags is not None or lto is not None:
raise ValueError("LTO and additional flags require PyNvJitLinker")
else:
return linker(max_registers, lineinfo, cc)
Expand Down Expand Up @@ -2706,8 +2706,6 @@ def add_file_guess_ext(self, path_or_code):
)
elif ext == '.cu':
self.add_cu_file(path_or_code)
elif ext == ".ltoir":
self.add_file(path_or_code, "ltoir")
else:
kind = FILE_EXTENSION_MAP.get(ext, None)
if kind is None:
Expand Down Expand Up @@ -3087,7 +3085,7 @@ def add_data(self, data, kind, name):
return self.add_ptx(data, name)
elif kind == FILE_EXTENSION_MAP["o"]:
fn = self._linker.add_object
elif kind == "ltoir":
elif kind == FILE_EXTENSION_MAP["ltoir"]:
fn = self._linker.add_ltoir
else:
raise LinkerError(f"Don't know how to link {kind}")
Expand Down

0 comments on commit f7939b6

Please sign in to comment.