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