HIP icon indicating copy to clipboard operation
HIP copied to clipboard

hipDeviceGetName returns an empty string

Open zjin-lcf opened this issue 2 years ago • 0 comments

#include <hip/hip_runtime.h>

#define len 256

int main() {
    int numDevices = 0;
    char name[len];
    hipDevice_t device;
    hipGetDeviceCount(&numDevices);
    printf("#devices %d\n", numDevices);
    for (int i = 0; i < numDevices; i++) {
        hipDeviceGet(&device, i);
        hipDeviceGetName(name, len, device);
        printf("%s\n", name);
    }
    return 0;
}

https://github.com/intel/llvm/pull/5508

zjin-lcf avatar Mar 16 '22 21:03 zjin-lcf