Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown error when importing cudaq from python #2503

Open
4 tasks done
petacube opened this issue Jan 11, 2025 · 6 comments
Open
4 tasks done

unknown error when importing cudaq from python #2503

petacube opened this issue Jan 11, 2025 · 6 comments

Comments

@petacube
Copy link

Required prerequisites

  • Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
  • If possible, make a PR with a failing test to give us a starting point to work on!

Describe the bug

Traceback (most recent call last):
File "/test_cudaq.py", line 2, in
import cudaq
File "lib/python3.11/site-packages/cudaq/init.py", line 53, in
from .kernel.kernel_decorator import kernel, PyKernelDecorator
File "lib/python3.11/site-packages/cudaq/kernel/kernel_decorator.py", line 15, in
from ..mlir.dialects import quake, cc, func
File "lib/python3.11/site-packages/cudaq/mlir/dialects/quake.py", line 10, in
from .._mlir_libs._quakeDialects.quake import *
ImportError: [custatevec] %unknown error in check_gpu_compatibility (line 36)

Steps to reproduce the bug

create file test_cudaq.py
import cudaq

run it

Expected behavior

should not raise an error as code comes from cudaq docs itself

Is this a regression? If it is, put the last known working version (or commit) here.

Not a regression

Environment

  • CUDA-Q version: 0.9.0
  • Python version: 3.11.9
  • C++ compiler: g++ 13.3.0
  • Operating system: Ubuntu 24.04.1 LTS

Suggestions

using Quadro T1000 with Max-Q GPU.

@petacube petacube changed the title unknown error when reporting cudaq unknown error when importing cudaq from python Jan 11, 2025
@bmhowe23
Copy link
Collaborator

Hi @petacube - thank you for reporting this issue. Do you know what version of CUDA you have installed? It would be helpful if you could run the nvidia-smi command and paste the output back into this thread.

I believe your GPU is Compute Capability 7.5 (according to https://developer.nvidia.com/cuda-gpus), but it good to double check that with this command: nvidia-smi --query-gpu=compute_cap --format=csv.

@petacube
Copy link
Author

petacube commented Jan 12, 2025 via email

@petacube
Copy link
Author

yes, its 7.5

@petacube
Copy link
Author

nvidia-smi
Sat Jan 11 22:50:03 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.42.02 Driver Version: 555.42.02 CUDA Version: 12.5 |
|-----------------------------------------+------------------------+----------------------+
| 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 Quadro T1000 with Max-Q ... Off | 00000000:01:00.0 Off | N/A |
| N/A 33C P8 2W / 40W | 4MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+

@petacube
Copy link
Author

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0

@petacube
Copy link
Author

I had upgraded nvidia driver to 565

and nvidia toolkit to 12.6
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Oct_29_23:50:19_PDT_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

and nvidia driver to 565
nvidia-smi
Sun Jan 12 00:04:04 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01 Driver Version: 565.57.01 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| 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 Quadro T1000 with Max-Q ... On | 00000000:01:00.0 Off | N/A |
| N/A 40C P8 2W / 40W | 4MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+

now the code works and error went away!!!
python test_cudaq.py
Running on target nvidia
{ 00:513 11:487 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants