Skip to content

Commit 7e253d6

Browse files
committed
test(core.utils): drop pre-cache get_kernel in cache roundtrip test
Loading the kernel on the freshly compiled ObjectCode before caching pre-warms driver-side module state, so a post-reload get_kernel on the deserialised copy would no longer uniquely prove that the cache flow works. Keep only the post-reload get_kernel call as the roundtrip guarantee.
1 parent f2eb9ab commit 7e253d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cuda_core/tests/test_program_cache.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,9 @@ def test_cache_roundtrip_with_real_compilation(backend, tmp_path, init_cuda):
623623
compiled = program.compile(target_type)
624624
finally:
625625
program.close()
626-
assert isinstance(compiled.get_kernel("my_kernel"), Kernel)
626+
# Do NOT call get_kernel() on ``compiled`` here: loading the module on the
627+
# driver would mutate driver-side state on the original ObjectCode and
628+
# weaken the roundtrip guarantee below.
627629

628630
key = make_program_cache_key(
629631
code=code,

0 commit comments

Comments
 (0)