Skip to content

Numba: no cuda support detected? #365262

Description

@arunoruto

Describe the bug

I am currently trying to work with Numba on a system with an Nvidia GPU. For this, I am trying to use the numbaWithNumba package found in nixpkgs, but is_available() gives me False all the time and numba -s returns an incomplete setup status for CUDA.

Steps To Reproduce

  1. Install numbaWithNumba in a shell via nix-shell -p python3Packages.numbaWithNumba
  2. Run python -c "import numba.cuda; print(numba.cuda.is_available())" -> results in False
  3. Run numba -s ->
System info:
/nix/store/c1rgbgz8d826xbyqcz6k68vvwkxbkh0m-python3-3.12.7-env/bin/python3.12: No module named pip
--------------------------------------------------------------------------------
__Time Stamp__
Report started (local time)                   : 2024-12-14 23:58:05.694113
UTC start time                                : 2024-12-14 22:58:05.694121
Running time (s)                              : 0.03438

__Hardware Information__
Machine                                       : x86_64
CPU Name                                      : skylake
CPU Count                                     : 16
Number of accessible CPUs                     : 16
List of accessible CPUs cores                 : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CFS Restrictions (CPUs worth of runtime)      : None

CPU Features                                  : 64bit adx aes avx avx2 bmi bmi2
                                                clflushopt cmov crc32 cx16 cx8
                                                f16c fma fsgsbase fxsr invpcid
                                                lzcnt mmx movbe pclmul popcnt
                                                prfchw rdrnd rdseed rtm sahf sgx
                                                sse sse2 sse3 sse4.1 sse4.2 ssse3
                                                xsave xsavec xsaveopt xsaves

Memory Total (MB)                             : 64133
Memory Available (MB)                         : 62099

__OS Information__
Platform Name                                 : Linux-6.6.63-x86_64-with-glibc2.40
Platform Release                              : 6.6.63
OS Name                                       : Linux
OS Version                                    : #1-NixOS SMP PREEMPT_DYNAMIC Fri Nov 22 14:38:37 UTC 2024
OS Specific Version                           : ?
Libc Version                                  : glibc 2.40

__Python Information__
Python Compiler                               : GCC 13.3.0
Python Implementation                         : CPython
Python Version                                : 3.12.7
Python Locale                                 : en_GB.UTF-8

__Numba Toolchain Versions__
Numba Version                                 : 0.61.0
llvmlite Version                              : 0.43.0

__LLVM Information__
LLVM Version                                  : 14.0.6

__CUDA Information__
CUDA Device Initialized                       : True
CUDA Driver Version                           : ?
CUDA Runtime Version                          : ?
CUDA NVIDIA Bindings Available                : ?
CUDA NVIDIA Bindings In Use                   : ?
CUDA Minor Version Compatibility Available    : ?
CUDA Minor Version Compatibility Needed       : ?
CUDA Minor Version Compatibility In Use       : ?
CUDA Detect Output:
Found 1 CUDA devices
id 0    b'NVIDIA TITAN X (Pascal)'                              [SUPPORTED]
                      Compute Capability: 6.1
                           PCI Device ID: 0
                              PCI Bus ID: 1
                                    UUID: GPU-b08e26d8-65ac-1443-3a8c-1fc9d3bf98a7
                                Watchdog: Disabled
             FP32/FP64 Performance Ratio: 32
Summary:
        1/1 devices are supported

CUDA Libraries Test Output:
None

__NumPy Information__
NumPy Version                                 : 1.26.4
NumPy Supported SIMD features                 : ('MMX', 'SSE', 'SSE2', 'SSE3', 'SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C', 'FMA3', 'AVX2')
NumPy Supported SIMD dispatch                 : ('SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C', 'FMA3', 'AVX2', 'AVX512F', 'AVX512CD', 'AVX512_KNL', 'AVX512_KNM', 'AVX512_SKX', 'AVX512_CLX', 'AVX512_CNL', 'AVX512_ICL', 'AVX512_SPR')
NumPy Supported SIMD baseline                 : ('SSE', 'SSE2', 'SSE3')
NumPy AVX512_SKX support detected             : False

__SVML Information__
SVML State, config.USING_SVML                 : False
SVML Library Loaded                           : False
llvmlite Using SVML Patched LLVM              : False
SVML Operational                              : False

__Threading Layer Information__
TBB Threading Layer Available                 : False
+--> Disabled due to Unknown import problem.
OpenMP Threading Layer Available              : True
+-->Vendor: GNU
Workqueue Threading Layer Available           : True
+-->Workqueue imported successfully.

__Numba Environment Variable Information__
None found.

__Conda Information__
Conda not available.

__Installed Packages__
Couldn't retrieve packages info.

__Error log__
Error (pip): Command '('/nix/store/c1rgbgz8d826xbyqcz6k68vvwkxbkh0m-python3-3.12.7-env/bin/python3.12', '-m', 'pip', 'list')' returned non-zero exit status 1.

__Warning log__
Warning (cuda): Probing CUDA failed (device and driver present, runtime problem?)
(cuda) <class 'OSError'>: libcudart.so: cannot open shared object file: No such file or directory
Warning: Conda not available.
 Error was [Errno 2] No such file or directory: 'conda'

Warning (no file): /sys/fs/cgroup/cpuacct/cpu.cfs_quota_us
Warning (no file): /sys/fs/cgroup/cpuacct/cpu.cfs_period_us
--------------------------------------------------------------------------------
If requested, please copy and paste the information between
the dashed (----) lines, or from a given specific section as
appropriate.

=============================================================
IMPORTANT: Please ensure that you are happy with sharing the
contents of the information present, any information that you
wish to keep private you should remove before sharing.
=============================================================

On the contrary, using jaxWithCuda works fine. I can import the lib, execute code and get results back.

Expected behavior

  1. The python command should return True
  2. Running numba -s should result in
    • no questions marks
    • libcudart.so should be found

Additional context

This happens on both unstable and 24.11. I also recently started using the cache from the cuda-team, but I had the problem before I added their substituter.

Metadata

  • system: "x86_64-linux"
  • host os: Linux 6.12.3, NixOS, 24.11 (Vicuna), 24.11.20241210.a0f3e10
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.10
  • nixpkgs: /nix/store/va0p2i72cm2ljwm084a0g6ji41s5qnyz-source

Notify maintainers

@mweinelt I know you are not listed as a maintainer, but you added a few cuda related things to numba, so maybe you can help me/clarify things a bit.


Note for maintainers: Please tag this issue in your PR.


Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: cudaParallel computing platform and API

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions