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

cuMemAdvise_v2 and cuMemPrefetchAsync_v2 driver functions aren't available in older cuda compilation tool <12.0.20 #269

Closed
akhildevelops opened this issue Jul 4, 2024 · 4 comments

Comments

@akhildevelops
Copy link

cuMemAdvise_v2 and cuMemPrefetchAsync_v2 driver functions aren't available for few of the older cuda compilation tools i.e, <12.0.20.

Can't use the functions memadvise and mem_prefetch_async as they depend on the driver functions that are not available on my system.

Facing compilation error as my cuda compilation tool version is 11.8

error[E0599]: no method named `cuMemAdvise_v2` found for reference `&'static driver::sys::sys_11080::Lib` in the current scope
   --> /home/akhil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.7/src/driver/result.rs:613:10
    |
612 | /     lib()
613 | |         .cuMemAdvise_v2(dptr, num_bytes, advice, location)
    | |_________-^^^^^^^^^^^^^^
    |
help: there is a method `cuMemAdvise` with a similar name
    |
613 |         .cuMemAdvise(dptr, num_bytes, advice, location)
    |          ~~~~~~~~~~~

   Compiling sqlx-macros v0.7.4
error[E0599]: no method named `cuMemPrefetchAsync_v2` found for reference `&'static driver::sys::sys_11080::Lib` in the current scope
     --> /home/akhil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.7/src/driver/result.rs:628:10
      |
627   | /     lib()
628   | |         .cuMemPrefetchAsync_v2(dptr, num_bytes, location, 0, stream)
      | |_________-^^^^^^^^^^^^^^^^^^^^^
      |
help: there is a method `cuMemPrefetchAsync` with a similar name, but with different arguments
     --> /home/akhil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.7/src/driver/sys/sys_11080.rs:12384:5
      |
12384 | /     pub unsafe fn cuMemPrefetchAsync(
12385 | |         &self,
12386 | |         devPtr: CUdeviceptr,
12387 | |         count: usize,
12388 | |         dstDevice: CUdevice,
12389 | |         hStream: CUstream,
12390 | |     ) -> CUresult {
      | |_________________^
➜  projects nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Sep_21_10:33:58_PDT_2022
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0
@akhildevelops akhildevelops changed the title cuMemAdvise_v2 and cuMemPrefetchAsync_v2 driver functions aren't available in cuda compilation version <12.0.20 cuMemAdvise_v2 and cuMemPrefetchAsync_v2 driver functions aren't available in older cuda compilation tool <12.0.20 Jul 4, 2024
@akhildevelops
Copy link
Author

akhildevelops commented Jul 4, 2024

Can I give a PR that conditionally selects either cuMemAdvise_v2 or cuMemAdvise based on the feature flag.

@ahem
Copy link

ahem commented Jul 4, 2024

until this is fixed, I can work around the problem by locking the cudarc version like this:

cudarc = { version = "<=0.11.6" }

@Lyn-liyuan
Copy link

I also encountered this issue. Using v0.11.6 can avoid this issue.

@coreylowman
Copy link
Owner

Fixed by #270. Just released 0.11.8 with this fix.

Sorry for delay!

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

4 participants