[BUG]: `launch()` rejects `numpy.intc` scalars on Windows
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 67/100
Rechercherichtung
Start with cuda.core's _kernel_arg_handler.pyx, where the issue says NumPy scalar classes are matched. Reproduce the unsupported-type error using the provided np.intc(5) launch example on Windows with NumPy 2, then compare its handling with np.int32(5) and check the corresponding tests. Done means the accepted scalar reaches the kernel as 5, with coverage for the reported platform and related integer types.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
Runtime Error
Component
cuda.core
Describe the bug
on windows with numpy 2, np.int32 is np.long, so np.intc ends up as its own class and launch() doesn't recognize it, _kernel_arg_handler.pyx only matches the fixed-width numpy classes. the same should happen with np.longlong on linux
How to Reproduce
import numpy as np
from cuda.core import Device, Program, LaunchConfig, launch
d = Device(); d.set_current(); s = d.create_stream()
src = 'extern "C" __global__ void k(int x, int* out){ *out = x; }'
ker = Program(src, "c++").compile("cubin").get_kernel("k")
out = d.allocate(4, stream=s)
launch(s, LaunchConfig(grid=1, block=1), ker, np.intc(5), out)
# TypeError: the argument is of unsupported type: <class 'numpy.intc'>
Expected behavior
same as np.int32(5), the kernel gets 5. I can put up a fix that falls back to the itemsize for np.signedinteger/np.unsignedinteger if you'd like
Operating System
Windows 11, RTX 4060 Ti, driver 610.88, cuda.core built from main (84e50ca49), numpy 2.5.5
nvidia-smi output
No response
- Vorherrschende Sprache
- Cython
- Sterne
- 3.4k
- Forks
- 353
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 163
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NVIDIA/cuda-python
-
[BUG]: the `__cuda_stream__` deprecation warning points to `Stream(obj)`, which always raisesEvtl. vergeben @Iamsohungrynow hat das vor 5 Tagen übernommen. Offenbug cuda.core P1
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
NVIDIA/cuda-python#3505 · 3 Kommentare · 1 Reaktion · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: ProcessInfo.used_gpu_memory returns the NVML_VALUE_NOT_AVAILABLE sentinel as a byte countOffentriage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
NVIDIA/cuda-python#3468 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
NVIDIA/cuda-python#3409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: cleanup-pr-previews never removes previews of deleted PRsEvtl. wieder frei @rwgk hat das vor 48 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
NVIDIA/cuda-python#2952 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookupEvtl. vergeben @rwgk hat das vor 63 Tagen übernommen. Offentriage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
NVIDIA/cuda-python#2646 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in NVIDIA/cuda-python
Ähnliche Issues
-
bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
dsx-ai-factory/health-validation#368 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
Tripstack-Corp/spyc#1352 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
vllm-project/vllm#70030 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
help wanted small extra
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag