Skip to content

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

Open
@rubenjr0

Description

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions