[BUG]: VirtualMemoryResource `host_numa` allocations always fail
Los mantenedores suelen responder en 1 día
@Andy-Jost ya está trabajando en esto.
Desde el 24/9/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- backend, operating-systems
Línea de trabajo
Empieza en cuda_core/cuda/core/_memory/_virtual_memory_resource.py, especialmente en VirtualMemoryResource.init y allocate, y revisa las definiciones de HOST_NUMA en cuda_core/cuda/core/typing.py. Ejecuta cuda_core/tests/test_memory.py y amplía la cobertura de las ubicaciones del host para probar la asignación, incluidos los casos reportados host_numa y host_numa_current. Se considera terminado cuando el comportamiento de las ubicaciones de host compatibles está probado y la asignación ya no falla porque falta el id de ubicación.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
Every VirtualMemoryResource allocation with location_type="host_numa" fails with CUDA_ERROR_INVALID_VALUE, on a system that reports host_numa_id 0 and host_numa_virtual_memory_management_supported True. VirtualMemoryResource.allocate passes prop.location.id = -1 whenever the resource has no device, which __init__ sets for every host location type, and cuMemCreate rejects CU_MEM_LOCATION_TYPE_HOST_NUMA with that id. cuda_core/cuda/core/typing.py documents HOST_NUMA as "host memory pinned to a specific NUMA node", and VirtualMemoryResourceOptions has no field that carries a node id.
location_type="host_numa_current" also fails, for a separate reason: cuMemCreate rejects CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT for every node id I passed it, including 0.
test_vmm_host_location_types_report_host_accessible in cuda_core/tests/test_memory.py parametrizes over host, host_numa and host_numa_current, but it only checks mr.device and mr.is_host_accessible, so it stays green without ever calling allocate.
How to Reproduce
from cuda.core import Device, VirtualMemoryResource, VirtualMemoryResourceOptions
dev = Device()
dev.set_current()
print("host_numa_id =", dev.properties.host_numa_id)
for location_type in ("host", "host_numa"):
opts = VirtualMemoryResourceOptions(location_type=location_type, handle_type=None)
buf = VirtualMemoryResource(dev, config=opts).allocate(4096)
print(location_type, "allocated", buf.size, "bytes")
buf.close()
host_numa_id = 0
host allocated 2097152 bytes
Traceback (most recent call last):
File "/tmp/vmm_host_numa.py", line 8, in <module>
buf = VirtualMemoryResource(dev, config=opts).allocate(4096)
File "/home/vyron-vasileiadis/projects/forks/cuda-python/cuda_core/cuda/core/_memory/_virtual_memory_resource.py", line 555, in allocate
raise_if_driver_error(res)
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "cuda/core/_utils/cuda_utils.pyx", line 134, in cuda.core._utils.cuda_utils._check_driver_error
File "cuda/core/_utils/cuda_utils.pyx", line 145, in cuda.core._utils.cuda_utils._check_driver_error
cuda.core._utils.cuda_utils.CUDAError: CUDA_ERROR_INVALID_VALUE: This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.
Expected behavior
allocate should either return a buffer pinned to a NUMA node, the way location_type="host" and location_type="device" already do, or fail at construction with an error naming the missing node id. Driving cuMemCreate directly on this system, CU_MEM_LOCATION_TYPE_HOST_NUMA returns CUDA_SUCCESS at location.id = 0 and CUDA_ERROR_INVALID_VALUE at location.id = -1, so the location id is the only thing standing between the current behaviour and a working allocation.
Operating System
Ubuntu 26.04 LTS
nvidia-smi output
Tue Aug 25 11:22:23 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84 Driver Version: 595.84 CUDA Version: 13.2 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 ... Off | 00000000:01:00.0 Off | N/A |
| N/A 46C P8 3W / 30W | 11MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
- Lenguaje dominante
- Cython
- Estrellas
- 3.4k
- Forks
- 334
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 126
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/cuda-python
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
NVIDIA/cuda-python#2952 ·
Los mantenedores suelen responder en 1 día
-
[DOC]: cuda.core 1.1.1 note misstates program cache permissionsPosiblemente ocupada @leofang la tomó hace 9 días. Abiertodocumentation P1
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
NVIDIA/cuda-python#2717 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[DOC]: `PinnedMemoryResource.allocate` documents no parametersPosiblemente ocupada @Andy-Jost la tomó hace 9 días. Abiertocuda.core documentation P1
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
NVIDIA/cuda-python#2712 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookupAbiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/cuda-python#2646 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[FEA]: Support inheritance from BufferPosiblemente ocupada @leofang la tomó hace 8 días. Abiertocuda.core triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA/cuda-python#2435 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/cuda-python
Issues similares
-
tool-calling
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
vllm-project/vllm#59838 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
raullenchai/Rapid-MLX#4037 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
diegosouzapw/OmniRoute#15401 ·
Los mantenedores suelen responder en 2 días
-
company delete fails with 500 on any company that has activity (cost events, inbox dismissals)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
paperclipai/paperclip#14982 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día