From 075d721970e9192212dafec6c12da6694870e0d9 Mon Sep 17 00:00:00 2001 From: Qi Li Date: Fri, 5 Aug 2022 16:54:56 +0800 Subject: [PATCH] [DCU] fix hipDeviceAttributeManagedMemory not support on DTK, test=develop (#44816) --- paddle/phi/backends/gpu/rocm/rocm_info.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/paddle/phi/backends/gpu/rocm/rocm_info.cc b/paddle/phi/backends/gpu/rocm/rocm_info.cc index b89d5a3c16..1646d9666f 100644 --- a/paddle/phi/backends/gpu/rocm/rocm_info.cc +++ b/paddle/phi/backends/gpu/rocm/rocm_info.cc @@ -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) { -- GitLab