[issue][hat] CUDA Build for Linux with NVIDIA 580.76.05 and CUDA 13.0
Juan Jose Fumero Alfonso
juan.fumero at oracle.com
Mon Sep 1 07:43:23 UTC 2025
Hi all,
Checking this morning on a new machine with Linux using the latest NVIDIA and CUDA drivers, the build fails for HAT:
```
/home/juan/repos/babylon/hat/backends/ffi/cuda/src/main/native/cpp/cuda_backend.cpp:85:31: error: too few arguments to function ‘CUresult cuCtxCreate_v4(CUctx_st**, CUctxCreateParams*, unsigned int, CUdevice)’
85 | CUDA_CHECK(cuCtxCreate(&context, 0, device), "cuCtxCreate");
| ^
/home/juan/repos/babylon/hat/backends/ffi/cuda/src/main/native/include/cuda_backend.h:78:16: note: in definition of macro ‘CUDA_CHECK’
78 | .e = err, \
| ^~~
In file included from /home/juan/repos/babylon/hat/backends/ffi/cuda/src/main/native/include/cuda_backend.h:52:
/usr/local/cuda/include/cuda.h:6275:18: note: declared here
6275 | CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, CUctxCreateParams *ctxCreateParams, unsigned int flags, CUdevice dev);
| ^~~~~~~~~~~
gmake[2]: *** [cuda/CMakeFiles/cuda_backend.dir/build.make:76: cuda/CMakeFiles/cuda_backend.dir/src/main/native/cpp/cuda_backend.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:323: cuda/CMakeFiles/cuda_backend.dir/all] Error 2
```
For CUDA 13, this is the new call:
https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__CTX.html#group__CUDA__CTX_1g77e9fb578caefca5ed15b4acebf35265
This should be an easy fix, but I wonder if HAT should focus on CUDA 13+ or try to support both (12.x and 13+).
Juan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/babylon-dev/attachments/20250901/7fd91b5d/attachment-0001.htm>
More information about the babylon-dev
mailing list