hcc icon indicating copy to clipboard operation
hcc copied to clipboard

HIP Program crash with missing constructor when compiled with HCC

Open davidrohr opened this issue 6 years ago • 1 comments

The program below crashes during hipLaunchKernelGGL instead of giving a failure at compile time, that the constructor for a is defined but not implemented:

#include <hip/hip_runtime.h>

class a
{
public:
    __device__ a();
    int x = 0;
};

__global__ void run_printf()
{
    a aa;
}

int main() {
    hipLaunchKernelGGL(HIP_KERNEL_NAME(run_printf), dim3(1), dim3(1), 0, 0);
    hipDeviceSynchronize();
}

Compiled via: hipcc -o test test.hip.cpp with ROCM 2.6/2.7 and a Radeon7 GPU.

The problem appears only when compiled with HIP_COMPILER=hcc (it works with nvcc and hip-clang), so in ROCm-Developer-Tools/HIP#1314 we decided to report this as hcc issue.

davidrohr avatar Sep 02 '19 15:09 davidrohr

HCC is no longer maintained.

PhilipDeegan avatar Oct 21 '19 19:10 PhilipDeegan