#include <hip/hip_runtime.h>
#include "isRocmDeviceSupported.h"
Go to the source code of this file.
◆ isRocmDeviceSupported()
bool isRocmDeviceSupported |
( |
int |
device | ) |
|
Definition at line 9 of file isRocmDeviceSupported.hip.cc.
References mps_update::status.
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);