@@ -355,15 +355,25 @@ def test_make_program_cache_key_nvvm_probe_changes_key(monkeypatch):
355355@pytest .mark .parametrize (
356356 "option_kw" ,
357357 [
358- pytest .param ({"time" : True }, id = "time" ),
359- pytest .param ({"ptxas_options" : "-v" }, id = "ptxas_options" ),
360- pytest .param ({"split_compile" : 0 }, id = "split_compile" ),
358+ pytest .param ({"time" : True }, id = "time_true" ),
359+ # ``_prepare_driver_options`` checks ``is not None``, so even the
360+ # "falsy-but-set" cases must still be rejected at key time.
361+ pytest .param ({"time" : False }, id = "time_false" ),
362+ pytest .param ({"ptxas_options" : "-v" }, id = "ptxas_options_str" ),
363+ pytest .param ({"ptxas_options" : ["-v" , "-O2" ]}, id = "ptxas_options_list" ),
364+ pytest .param ({"ptxas_options" : []}, id = "ptxas_options_empty_list" ),
365+ pytest .param ({"split_compile" : 0 }, id = "split_compile_zero" ),
366+ pytest .param ({"split_compile" : 4 }, id = "split_compile_nonzero" ),
367+ # split_compile_extended is a LinkerOptions-only field; ProgramOptions
368+ # does not expose it, so it cannot reach the driver linker via
369+ # Program.compile and is not part of the cache-time guard.
361370 ],
362371)
363372def test_make_program_cache_key_ptx_rejects_driver_linker_unsupported (option_kw , monkeypatch ):
364373 """When the driver (cuLink) linker backend is selected, options that
365374 ``_prepare_driver_options`` rejects must also be rejected at key time
366- so we never cache a compilation that would fail."""
375+ so we never cache a compilation that would fail. Uses ``is not None``
376+ to exactly mirror the driver-linker's own gate."""
367377 from cuda .core import _linker
368378
369379 monkeypatch .setattr (_linker , "_decide_nvjitlink_or_driver" , lambda : True ) # driver
0 commit comments