Commit eeabd46a by Thomas Viehmann Committed by masahi

add DeviceName to ROCm api (#4437)

parent 2d0010f3
......@@ -78,8 +78,13 @@ class ROCMDeviceAPI final : public DeviceAPI {
*rv = os.str();
return;
}
case kDeviceName:
case kDeviceName: {
std::string name(256, 0);
ROCM_CALL(hipDeviceGetName(&name[0], name.size(), ctx.device_id));
name.resize(strlen(name.c_str()));
*rv = std::move(name);
return;
}
case kMaxClockRate: {
ROCM_CALL(hipDeviceGetAttribute(&value, hipDeviceAttributeClockRate,
ctx.device_id));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment