Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
d5f8c19
feat(core.utils): add persistent program caches (sqlite + filestream)
cpcloud Apr 17, 2026
a4eeeec
fixup! feat(core.utils): narrow key inputs by backend
cpcloud Apr 18, 2026
531444a
fixup! test(core.utils): guard against drift between cache + Program.…
cpcloud Apr 18, 2026
47b47da
fixup! test(core.utils): use tokenize to parse SUPPORTED_TARGETS (ign…
cpcloud Apr 18, 2026
55f4d47
fixup! feat(core.utils): NVVM fingerprint, Windows replace retry, dri…
cpcloud Apr 18, 2026
cdfd5e3
fixup! feat(core.utils): use is-not-None gate for driver-linker unsup…
cpcloud Apr 18, 2026
65ae457
fixup! test(core.utils): cover tuple-valued ptxas_options in driver-l…
cpcloud Apr 18, 2026
2d29e04
fixup! feat(core.utils): _option_is_set mirrors compiler gates precisely
cpcloud Apr 18, 2026
c8c590e
fixup! feat(core.utils): special-case include_path/pre_include in _op…
cpcloud Apr 18, 2026
8c70110
fixup! feat(core.utils): use collections.abc.Sequence to match _prepa…
cpcloud Apr 18, 2026
f28e7fa
fixup! docs(core.utils): sync _option_is_set docstring with Sequence …
cpcloud Apr 18, 2026
5004f7a
fixup! feat(core.utils): per-field linker gates + use_libdevice truth…
cpcloud Apr 18, 2026
08ca973
fixup! feat(core.utils): backend-aware linker fingerprint collapses d…
cpcloud Apr 18, 2026
acaccca
fixup! feat(core.utils): canonicalize ptxas_options; scope use_libdev…
cpcloud Apr 18, 2026
3c97d22
fixup! feat(core.utils): collapse empty ptxas_options sequence to None
cpcloud Apr 18, 2026
1a94027
fixup! feat(core.utils): require extra_digest for NVVM use_libdevice=…
cpcloud Apr 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions cuda_core/cuda/core/utils.py

This file was deleted.

43 changes: 43 additions & 0 deletions cuda_core/cuda/core/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

from cuda.core._memoryview import (
StridedMemoryView,
args_viewable_as_strided_memory,
)

__all__ = [
"FileStreamProgramCache",
"ProgramCacheResource",
"SQLiteProgramCache",
"StridedMemoryView",
"args_viewable_as_strided_memory",
"make_program_cache_key",
]

# Lazily expose the program-cache APIs so ``from cuda.core.utils import
# StridedMemoryView`` stays lightweight -- the cache backends pull in driver,
# NVRTC, and module-load machinery that memoryview-only consumers do not need.
_LAZY_CACHE_ATTRS = frozenset(
{
"FileStreamProgramCache",
"ProgramCacheResource",
"SQLiteProgramCache",
"make_program_cache_key",
}
)


def __getattr__(name):
if name in _LAZY_CACHE_ATTRS:
from cuda.core.utils import _program_cache

value = getattr(_program_cache, name)
globals()[name] = value # cache for subsequent accesses
return value
raise AttributeError(f"module 'cuda.core.utils' has no attribute {name!r}")


def __dir__():
return sorted(__all__)
Loading
Loading