Skip to content

Commit 9ea2fd4

Browse files
committed
style fixes
1 parent 21216f1 commit 9ea2fd4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

numba_cuda/numba/cuda/codegen.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,12 @@ def get_cubin(self, cc=None):
216216
print('=' * 80)
217217
except driver.LinkerError as e:
218218
if linkererr_cause := getattr(e, "__cause__", None):
219-
if "-ptx requires that all inputs have LTOIR" in str(linkererr_cause):
219+
if "-ptx requires that all inputs have LTOIR" in str(
220+
linkererr_cause
221+
):
220222
warn(
221-
"Linker input contains non-LTOIR objects, nvjitlink "
222-
"cannot generate LTO-ed PTX."
223+
"Linker input contains non-LTOIR objects, nvjitlink"
224+
" cannot generate LTO-ed PTX."
223225
)
224226

225227
linker = driver.Linker.new(

numba_cuda/numba/cuda/tests/cudadrv/test_nvjitlink.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_nvjitlink_jit_with_linkable_code_lto_dump_assembly(self):
181181
]
182182

183183
config.DUMP_ASSEMBLY = True
184-
184+
185185
for file in files:
186186
with self.subTest(file=file):
187187
f = io.StringIO()
@@ -201,7 +201,6 @@ def kernel(result):
201201

202202
config.DUMP_ASSEMBLY = False
203203

204-
205204
def test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn(self):
206205
files = [
207206
test_device_functions_a,
@@ -212,13 +211,15 @@ def test_nvjitlink_jit_with_linkable_code_lto_dump_assembly_warn(self):
212211
]
213212

214213
config.DUMP_ASSEMBLY = True
215-
214+
216215
for file in files:
217216
with self.subTest(file=file):
218217
with warnings.catch_warnings(record=True) as w:
219218
with contextlib.redirect_stdout(None): # suppress other PTX
220219
sig = "uint32(uint32, uint32)"
221-
add_from_numba = cuda.declare_device("add_from_numba", sig)
220+
add_from_numba = cuda.declare_device(
221+
"add_from_numba", sig
222+
)
222223

223224
@cuda.jit(link=[file], lto=True)
224225
def kernel(result):
@@ -231,7 +232,6 @@ def kernel(result):
231232
assert len(w) == 1
232233
self.assertIn("cannot generate LTO-ed PTX", str(w[0].message))
233234

234-
235235
config.DUMP_ASSEMBLY = False
236236

237237
def test_nvjitlink_jit_with_invalid_linkable_code(self):

0 commit comments

Comments
 (0)