CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
227 stars 34 forks source link

Error: no viable conversion from 'const __hip_builtin_blockIdx_t' to 'dim3' #894

Closed pvelesko closed 4 months ago

pvelesko commented 4 months ago

Found while compiling rocRand

#include <hip/hip_runtime.h>
#include <iostream>

__global__ void errorKernel() {
    dim3 myDim3 = blockIdx; // This line will cause the error
}

int main() {
    errorKernel<<<1, 1>>>();
    hipDeviceSynchronize();

    std::cout << "If you see this, the error wasn't caught at runtime." << std::endl;

    return 0;
}