Skip to content

coverage: add cuda.core tests for host, launcher cluster, strided layout, program-cache, and DLPack utils#2168

Open
rluo8 wants to merge 1 commit into
NVIDIA:mainfrom
rluo8:main
Open

coverage: add cuda.core tests for host, launcher cluster, strided layout, program-cache, and DLPack utils#2168
rluo8 wants to merge 1 commit into
NVIDIA:mainfrom
rluo8:main

Conversation

@rluo8
Copy link
Copy Markdown
Contributor

@rluo8 rluo8 commented Jun 5, 2026

Description

Tests covered:

File New tests Target source
test_host.py repr for all three Host forms; pickle/copy round-trip preserves the singleton via __reduce__ _host.py
test_launcher.py thread-block-cluster cc gate (accept ≥9.0 / reject <9.0, Device mocked); cluster branch of _to_native_launch_config _launch_config.pyx
test_program_cache.py FileStream size-cap __delitem__/clear, entry-path iteration with missing/stray dirs, tmp-size accounting, touch_atime fallback + swallowed open/fstat failures utils/_program_cache/_file_stream.py
test_strided_layout.py validation/error paths: dense_like, repr-with-offset, min/max offset, broadcast_to, unsqueezed, repacked pack/unpack, max_compatible_itemsize _layout.pyx
test_utils.py as_tensor_map kwargs assembly; DLPack export round-trip over all NumPy-native dtypes + scalar/zero-volume shapes; versioned/unversioned capsule deleters; from_dlpack TypeError→unversioned fallback; CAI device-pointer/stream-ordering; DLPack C-exchange-API helpers _memoryview.pyx

Coverage impact

Measured with paired full-coverage runs (no-patch baseline vs this patch):

Scope Before After Δ
cuda/core/ overall 79.81% 81.84% +2.03% (−213 missed)
_memoryview.pyx 65.82% 85.73% +19.92%
_host.py 83.64% 100.00% +16.36%
_launch_config.pyx 77.46% 91.55% +14.08%
_layout.pyx 89.59% 96.23% +6.64%
_file_stream.py 84.51% 90.49% +5.99%

Testing

  • Full local run on py314: all added tests pass.
  • Cross-platform on local GPU runners: Linux x64 + Windows x64, green.
  • Additionally verified on a B100 windows + Tesla T4 host.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Jun 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant