未验证 提交 075d7219 编写于 作者: Q Qi Li 提交者: GitHub

[DCU] fix hipDeviceAttributeManagedMemory not support on DTK, test=develop (#44816)

上级 df790b9b
......@@ -301,14 +301,10 @@ bool IsGPUManagedMemorySupported(int dev_id) {
"but received id is: %d. GPU count is: %d.",
dev_id,
GetGPUDeviceCount()));
#if defined(__linux__) || defined(_WIN32)
int ManagedMemoryAttr;
PADDLE_ENFORCE_GPU_SUCCESS(hipDeviceGetAttribute(
&ManagedMemoryAttr, hipDeviceAttributeManagedMemory, dev_id));
return ManagedMemoryAttr != 0;
#else
// TODO(qili93): Hygon DTK (21.04 and 22.04) not support
// hipDeviceAttributeManagedMemory, temporary disable by default, to be
// verified in next DTK release
return false;
#endif
}
bool IsGPUManagedMemoryOversubscriptionSupported(int dev_id) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册