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

CUDA-JIT: Invalid value for --gpu-architecture #2453

Open
rubenjr0 opened this issue Nov 2, 2024 · 3 comments
Open

CUDA-JIT: Invalid value for --gpu-architecture #2453

rubenjr0 opened this issue Nov 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@rubenjr0
Copy link
Contributor

rubenjr0 commented Nov 2, 2024

Describe the bug

The CudaJit backend produces a panic on startup on 0.15 and main:

thread 'main' panicked at /home/USER/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/0dff475/crates/cubecl-cuda/src/compute/server.rs:328:17:
[Compilation Error]
    nvrtc: error: invalid value for --gpu-architecture (-arch)
[Source]
typedef unsigned int uint;

struct __align__(32) float_8 {
    float i_0;
    float i_1;
    float i_2;
    float i_3;
    float i_4;
    float i_5;
    float i_6;
    float i_7;
};


extern "C" __global__ void kernel(
float_8 output_0[],float_8 output_1[],uint info[]
) {

    int3 absoluteIdx = make_int3(
        blockIdx.x * blockDim.x + threadIdx.x,
        blockIdx.y * blockDim.y + threadIdx.y,
        blockIdx.z * blockDim.z + threadIdx.z
    );

    uint idxGlobal = (absoluteIdx.z * gridDim.x * blockDim.x * gridDim.y * blockDim.y) + (absoluteIdx.y * gridDim.x * blockDim.x) + absoluteIdx.x;
uint rank = info[0];
uint rank_2 = rank * 2;
uint l_0_0;
bool l_0_1;
float l_0_2;
float l_0_3;
l_0_0 = info[(2 * 2 * info[0]) + 1] / 8;
l_0_1 = idxGlobal < l_0_0;
if (l_0_1) {
l_0_0 = uint(0);
l_0_2 = float(l_0_0);
l_0_0 = uint(1);
l_0_3 = float(l_0_0);
output_0[idxGlobal] = float_8{
float(l_0_2),
float(l_0_2),
float(l_0_2),
float(l_0_2),
float(l_0_2),
float(l_0_2),
float(l_0_2),
float(l_0_2),
};
output_1[idxGlobal] = float_8{
float(l_0_3),
float(l_0_3),
float(l_0_3),
float(l_0_3),
float(l_0_3),
float(l_0_3),
float(l_0_3),
float(l_0_3),
};
}

}

To Reproduce
Steps to reproduce the behavior:

  1. Use the cuda-jit feature
  2. Use the CudaJit backend
  3. Attempt to run
  4. See error

Desktop:

  • OS: Pop!_OS 22.04
  • GPU: NVIDIA GeForce RTX 4060 Ti
@nathanielsimard
Copy link
Member

@laggui
Copy link
Member

laggui commented Nov 26, 2024

@rubenjr0 is this still an issue?

@rubenjr0
Copy link
Contributor Author

Yes, I can confirm it is still an issue. I ran cargo update to fetch the latest version of burn and still got:

thread 'main' panicked at /home/MYUSER/.cargo/git/checkouts/cubecl-aa41a28b39b598f9/2c09d4d/crates/cubecl-cuda/src/compute/server.rs:380:17:
[Compilation Error]
    nvrtc: error: invalid value for --gpu-architecture (-arch)

@laggui laggui added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants