SWDEV-539145 - Return error when ext_fine_grain_pool unavailable (#877)

Return error when ext_fine_grain_pool is unavailable for
hipHostMallocUncached, hipHostAllocUncached and
hipExtHostRegisterUncached.
Disable related tests on Navi4x where
ext_fine_grain_pool is unavailable
This commit is contained in:
MachineTom
2025-09-21 19:25:28 -04:00
committed by GitHub
orang tua c6c2fa212c
melakukan 25922d08c3
6 mengubah file dengan 43 tambahan dan 16 penghapusan
@@ -268,6 +268,28 @@ static inline bool IsGfx11() {
#endif
}
static inline bool IsNavi4X() {
#if HT_NVIDIA
return false;
#elif HT_AMD
int device = -1;
hipDeviceProp_t props{};
HIP_CHECK(hipGetDevice(&device));
HIP_CHECK(hipGetDeviceProperties(&props, device));
std::string arch = std::string(props.gcnArchName);
if (arch.find("gfx1200") != std::string::npos ||
arch.find("gfx1201") != std::string::npos) {
// gfx1200 = Navi44, gfx1201 = Navi48
return true;
} else {
return false;
}
#else
std::cout << "Have to be either Nvidia or AMD platform, asserting" << std::endl;
assert(false);
#endif
}
// Utility Functions
namespace HipTest {
static inline int getDeviceCount() {