File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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 ):
You can’t perform that action at this time.
0 commit comments