@@ -373,12 +373,6 @@ def _nvvm_fingerprint() -> str:
373373 return f"lib={ lib_major } .{ lib_minor } ;ir={ major } .{ minor } .{ debug_major } .{ debug_minor } "
374374
375375
376- def _cuda_core_version () -> str :
377- from cuda .core ._version import __version__
378-
379- return str (__version__ )
380-
381-
382376# ProgramOptions fields that reference external files whose *contents* the
383377# cache key cannot observe without reading the filesystem. Callers that set
384378# any of these must supply an ``extra_digest`` covering the dependency surface
@@ -453,7 +447,7 @@ def make_program_cache_key(
453447 code_type : str ,
454448 options : ProgramOptions ,
455449 target_type : str ,
456- name_expressions : Sequence [str ] = (),
450+ name_expressions : Sequence [str | bytes | bytearray ] = (),
457451 extra_digest : bytes | None = None ,
458452) -> bytes :
459453 """Build a stable cache key from compile inputs.
@@ -472,6 +466,11 @@ def make_program_cache_key(
472466 One of ``"ptx"``, ``"cubin"``, ``"ltoir"``.
473467 name_expressions:
474468 Optional iterable of mangled-name lookups. Order is not significant.
469+ Elements may be ``str``, ``bytes``, or ``bytearray``; ``"foo"`` and
470+ ``b"foo"`` produce distinct keys because ``Program.compile`` records
471+ the original Python object as the ``ObjectCode.symbol_mapping`` key,
472+ and ``get_kernel`` lookups must use the same type the cache key
473+ recorded.
475474 extra_digest:
476475 Caller-supplied bytes mixed into the key. Required whenever
477476 :class:`cuda.core.ProgramOptions` sets any option that pulls in
@@ -669,9 +668,6 @@ def _probe(label: str, fn):
669668 return None
670669
671670 _update ("schema" , str (_KEY_SCHEMA_VERSION ).encode ("ascii" ))
672- cuda_core_ver = _probe ("cuda_core" , _cuda_core_version )
673- if cuda_core_ver is not None :
674- _update ("cuda_core" , cuda_core_ver .encode ("ascii" ))
675671 if backend == "nvrtc" :
676672 nvrtc_ver = _probe ("nvrtc" , _nvrtc_version )
677673 if nvrtc_ver is not None :
@@ -775,9 +771,16 @@ class SQLiteProgramCache(ProgramCacheResource):
775771 Filesystem path to the sqlite3 database. The parent directory is
776772 created if missing.
777773 max_size_bytes:
778- Optional size cap in bytes. When the sum of stored payload sizes
774+ Optional cap on the sum of stored payload sizes. When that total
779775 exceeds the cap, the least-recently-used entries are evicted until
780- the total is at or below the cap. ``None`` means unbounded.
776+ the logical total is at or below the cap; ``None`` means unbounded.
777+ Real on-disk usage tracks the logical total *at quiescent points*:
778+ WAL frames and freed pages are reclaimed opportunistically via
779+ ``wal_checkpoint(TRUNCATE)`` + ``VACUUM`` after each eviction, but
780+ ``sqlite3`` skips both under active readers or writers. With
781+ concurrent access, the on-disk file can grow above the cap until
782+ readers release; :class:`FileStreamProgramCache` is the right
783+ backend for multi-process workloads with strict on-disk bounds.
781784 """
782785
783786 def __init__ (
0 commit comments