Skip to content

cust error: struct CUDA_KERNEL_NODE_PARAMS_st has no field named ctx #209

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

Open
hduoc2003 opened this issue Apr 29, 2025 · 1 comment
Open

Comments

@hduoc2003
Copy link

hduoc2003 commented Apr 29, 2025

I attempted to run the vecadd example but encountered the following errors:

➜  vecadd cargo run 
   Compiling rustc_codegen_nvvm v0.3.0 (https://github.com/Rust-GPU/Rust-CUDA#290d7115)
   Compiling cust v0.3.2 (https://github.com/Rust-GPU/Rust-CUDA#290d7115)
error[E0560]: struct `CUDA_KERNEL_NODE_PARAMS_st` has no field named `kern`
  --> /root/.cargo/git/checkouts/rust-cuda-f2e68423bdc84998/290d711/crates/cust/src/graph.rs:97:13
   |
97 |             kern: ptr::null_mut(),
   |             ^^^^ `CUDA_KERNEL_NODE_PARAMS_st` does not have this field
   |
   = note: all struct fields are already assigned

error[E0560]: struct `CUDA_KERNEL_NODE_PARAMS_st` has no field named `ctx`
  --> /root/.cargo/git/checkouts/rust-cuda-f2e68423bdc84998/290d711/crates/cust/src/graph.rs:98:13
   |
98 |             ctx: ptr::null_mut(),
   |             ^^^ `CUDA_KERNEL_NODE_PARAMS_st` does not have this field
   |
   = note: all struct fields are already assigned

For more information about this error, try `rustc --explain E0560`.
error: could not compile `cust` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Context

I recently switched the cust, cuda_std, and cuda_builder crates from local paths to their current Git versions.


Environment

$ llvm-config --version
7.0.1

$ 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

rust-toolchain.toml

Same as main branch.

[toolchain]
channel = "nightly-2025-03-02"
components = [
    "clippy",
    "llvm-tools-preview",
    "rust-src",
    "rustc-dev",
    "rustfmt",
    "rust-analyzer"
]
@jorge-ortega
Copy link
Collaborator

Hi @hduoc2003,

The error is due to changes in CUDA SDK from version 11 to version 12. During the reboot of this project, we updated our bindings (cust-raw) and the safe wrappers (cust) but only focused on supporting CUDA 12. We should be able to add support back for 11.8. In the meantime, try to use CUDA 12.1 or higher (there is another issue with 12.0 #175).

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