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

DynamicModule SDK library path #317

Open
matthiaswilms opened this issue Nov 14, 2021 · 6 comments
Open

DynamicModule SDK library path #317

matthiaswilms opened this issue Nov 14, 2021 · 6 comments

Comments

@matthiaswilms
Copy link

Hello, I would just like to confirm this consideration

TODO:
- Is $CUDA_ROOT/lib64 the correct path to assume for 64-Bit CUDA libraries on Linux?

in _locate_cuda_libdir of the DynamicModule class in compiler.py

I'm running 64-bit Linux (Ubuntu 20.04) and installed cuda and pycuda in a conda environment. In particular _locate_cuda_libdir ends up in this case for me:

if libdir is None:
    nvcc_path = _find_nvcc_on_path()
    if nvcc_path is not None:
        libdir = join(os.path.dirname(nvcc_path), "..", "lib64")

However the correct directory name is just "lib" instead of "lib64" in my installation. Providing the correct path in the constructor of course makes it work.

@inducer
Copy link
Owner

inducer commented Nov 14, 2021

What version of the CUDA toolkit do you have? It's lib64 on mine. (11.2.2 installed from Debian.)

@matthiaswilms
Copy link
Author

I can't seem to dig up 11.2.2 on conda anywhere to test that, but 11.1.1, 11.3.1 (which I am running) and 11.5.0 all result in the folder being lib for me.

@matthiaswilms
Copy link
Author

matthiaswilms commented Nov 15, 2021

I just manually installed CUDA, and as per the installation instructions , the folder is named lib64.
So it seems the above is a conda specific situation.
Edit: I don't know too much about any of this, but my impression is conda packages are expected to always install into lib, lib64 is not used.

@inducer
Copy link
Owner

inducer commented Nov 15, 2021

I suspect that test could be improved by checking if lib64 exists, and if it does not, to try lib.

@inducer
Copy link
Owner

inducer commented Nov 15, 2021

PRs welcome.

@inducer
Copy link
Owner

inducer commented Nov 15, 2021

FWIW, if you're using conda, you might as well use the pycuda package from conda-forge.

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