Skip to content

Commit 1d45767

Browse files
committed
make linter happy
1 parent 57a9b19 commit 1d45767

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cuda_core/cuda/core/experimental/_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class ObjectCode:
245245
__slots__ = ("_handle", "_backend_version", "_code_type", "_module", "_loader", "_sym_map")
246246
_supported_code_type = ("cubin", "ptx", "ltoir", "fatbin")
247247

248-
def __init__(self, module: Union[bytes, str], *, symbol_mapping: Optional[dict]=None):
248+
def __init__(self, module: Union[bytes, str], *, symbol_mapping: Optional[dict] = None):
249249
_lazy_init()
250250

251251
# handle is assigned during _lazy_load
@@ -256,7 +256,7 @@ def __init__(self, module: Union[bytes, str], *, symbol_mapping: Optional[dict]=
256256
self._module = module
257257
self._sym_map = {} if symbol_mapping is None else symbol_mapping
258258

259-
def _init(module, code_type, *, symbol_mapping: Optional[dict]=None):
259+
def _init(module, code_type, *, symbol_mapping: Optional[dict] = None):
260260
self = ObjectCode.__new__(ObjectCode)
261261
if code_type not in self._supported_code_type:
262262
raise ValueError

cuda_core/tests/test_module.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_object_code_load_cubin(get_saxpy_kernel):
9090
sym_map = mod._sym_map
9191
assert isinstance(cubin, bytes)
9292
mod = ObjectCode(cubin, symbol_mapping=sym_map)
93-
ker = mod.get_kernel("saxpy<double>")
93+
mod.get_kernel("saxpy<double>") # force loading
9494

9595

9696
def test_object_code_load_cubin_from_file(get_saxpy_kernel, tmp_path):
@@ -101,4 +101,4 @@ def test_object_code_load_cubin_from_file(get_saxpy_kernel, tmp_path):
101101
cubin_file = tmp_path / "test.cubin"
102102
cubin_file.write_bytes(cubin)
103103
mod = ObjectCode(str(cubin_file), symbol_mapping=sym_map)
104-
ker = mod.get_kernel("saxpy<double>")
104+
mod.get_kernel("saxpy<double>") # force loading

0 commit comments

Comments
 (0)