[BUG]: im2col-wide skip probe uses an inner box wider than the swizzle span, so the #2077 im2col-wide tests never run
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Đọc cuda_core/tests/test_tensor_map.py:709-787 và chạy pytest cuda_core/tests/test_tensor_map.py -k Im2colWide -rs trên thiết bị CUDA 13+ được hỗ trợ. Điều chỉnh probe và đầu vào của test như mô tả để các trường hợp hợp lệ được chạy, đồng thời giữ lại một trường hợp âm cho đầu vào 256 B không hợp lệ. Hoàn thành khi các test im2col-wide đều pass thay vì bị bỏ qua một cách âm thầm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct.
Type of Bug
Silent Failure
Component
cuda.core
Describe the bug
This is the cause of the four TestTensorMapIm2colWide entries in #2077. They skip on every lane, including cc 10.x and 12.x devices, because the skip probe sends inputs the driver is documented to reject.
- The probe
skip_if_no_im2col_wideand the 3D/4D/5D tests (cuda_core/tests/test_tensor_map.py:709-787) use fp32 withchannels_per_pixel=64, so the inner box is 64 × 4 B = 256 B. The 4D/5D tests pass nodata_type, and_DeviceArraydefaults to float32. - They use the default
SWIZZLE_128B. ThecuTensorMapEncodeIm2colWidedocs say that withINTERLEAVE_NONEthe inner box (channelsPerPixel× element size) must be no larger than the swizzle size, and "CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner dimension to be <= 128". - The driver therefore returns
CUDA_ERROR_INVALID_VALUE, and the probe turns that intoskip("Im2col-wide unsupported on this driver/GPU combination"). The gb300 nightly and the rtxpro6000 lanes show exactly that skip for all four tests. - The driver path itself works on those lanes:
bench_tensormap.pyencodes im2col-wide with fp16 × 32 channels (64 B) andSWIZZLE_128B, and reports a timing on gh200, gb300 and rtxpro6000.
The other _from_im2col_wide caller in the tests (test_from_im2col_wide_rejects_tensor_from_other_device) raises ValueError before reaching the driver. So the cuda.core im2col-wide factory has not produced a descriptor in any CI lane since #1687.
How to Reproduce
On a B300 (cc 10.3), main at db463bf, cuda.core built from source, cuda.bindings 13.5.0:
pytest cuda_core/tests/test_tensor_map.py -k Im2colWide -rs
gives 4 skipped, each with "Im2col-wide unsupported on this driver/GPU combination".
Calling the raw driver and cuda.core with identical arguments on the same GPU:
| case | cuTensorMapEncodeIm2colWide |
_from_im2col_wide |
|---|---|---|
| 3D/4D/5D as written: fp32, 64 ch (256 B), SWIZZLE_128B | INVALID_VALUE | INVALID_VALUE |
| 3D/4D/5D: fp32, 32 ch (128 B), SWIZZLE_128B | OK | OK |
| 3D: fp16, 64 ch (128 B), SWIZZLE_128B | OK | OK |
| 3D: fp32, 16 ch (64 B), SWIZZLE_64B | OK | OK |
The raw and cuda.core results agree in every case, so cuda.core's marshalling is fine and the inputs are the problem.
I also checked that a valid descriptor from _from_im2col_wide (rank 3, fp32, SWIZZLE_128B) is usable. An NVRTC sm_103a kernel loads it into shared memory with cp.async.bulk.tensor.3d...im2col::w, and after undoing the 128B swizzle the rows match the source tensor.
Expected behavior
The im2col-wide tests run on cc >= 10 devices with a CUDA 13 build. With channels_per_pixel=32 in the probe and the 3D/4D/5D tests (fp32 × 32 = 128 B), the same B300 run gives 5 passed. That includes a new negative test that keeps the old 256 B input as a must-raise CUDA_ERROR_INVALID_VALUE case. The whole of test_tensor_map.py then gives 78 passed and 7 skipped; none of the skips is in this class.
I would also drop the probe's CUDA_ERROR_INVALID_VALUE → skip branch and keep only the cc < 10 gate and the "requires a CUDA 13+ build" skip. That branch is what kept these tests hidden. If it stayed, a later encoding regression would again skip all of them silently, the new negative test included. The benchmark above shows the driver accepts valid input on the current lanes. If you prefer to keep the branch, changing only the inputs is enough to make the tests run.
The patch is ready (test file only, new test marked human_reviewed). I can open the PR if you assign this to me.
Operating System
Linux x86_64 (Ubuntu 24.04)
nvidia-smi output
NVIDIA B300 SXM6 AC (cc 10.3), driver 610.57.04 (CUDA 13.3 driver API), Python 3.12.3.
- Ngôn ngữ chính
- Cython
- Star
- 3.4k
- Fork
- 353
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 163
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuda-python
-
[BUG]: the `__cuda_stream__` deprecation warning points to `Stream(obj)`, which always raisesCó thể đã có người làm @Iamsohungrynow đã nhận 5 ngày trước. Đang mởbug cuda.core P1
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
NVIDIA/cuda-python#3505 · 3 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: ProcessInfo.used_gpu_memory returns the NVML_VALUE_NOT_AVAILABLE sentinel as a byte countĐang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
NVIDIA/cuda-python#3468 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: cleanup-pr-previews never removes previews of deleted PRsCó thể làm lại được @rwgk đã nhận 48 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
NVIDIA/cuda-python#2952 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookupCó thể đã có người làm @rwgk đã nhận 62 ngày trước. Đang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
NVIDIA/cuda-python#3617 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/cuda-python
Issue tương tự
-
priority: low tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
LearningCircuit/local-deep-research#9161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue spec
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
BuilderIO/agent-native#9879 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
angrymrt/wiskunde-fit#242 ·
Maintainer thường phản hồi trong vòng 1 ngày