1 #include <hip/hip_runtime.h> 10 bool supported =
false;
14 hipError_t
status = hipSetDevice(device);
19 status = hipMalloc(&supported_d,
sizeof(
bool));
24 status = hipMemset(supported_d, 0x00,
sizeof(
bool));
29 setSupported<<<1, 1>>>(supported_d);
32 status = hipGetLastError();
37 status = hipDeviceSynchronize();
42 status = hipMemcpy(&supported, supported_d,
sizeof(
bool), hipMemcpyDeviceToHost);
47 status = hipFree(supported_d);
bool isRocmDeviceSupported(int device)