SWDEV-367689 - [catch2][dtest] UnifiedAddress attribute support for AMD (#204)

Change-Id: Ie820e8d9fb59322fb66380bf676a66362adc0b65
Tento commit je obsažen v:
ROCm CI Service Account
2023-03-24 16:00:35 +05:30
odevzdal GitHub
rodič 07260cf7e7
revize d3942fe73b
+9 -10
Zobrazit soubor
@@ -1,16 +1,13 @@
/*
Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2022 - 2023 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -232,8 +229,10 @@ TEST_CASE("Unit_hipGetDeviceAttribute_CheckAttrValues") {
hipDeviceAttributeEccEnabled,
props.ECCEnabled));
HIP_CHECK(test_hipDeviceGetAttribute(deviceId,
hipDeviceAttributeTexturePitchAlignment,
props.texturePitchAlignment));
hipDeviceAttributeTexturePitchAlignment,
props.texturePitchAlignment));
HIP_CHECK(test_hipDeviceGetAttribute(deviceId,
hipDeviceAttributeUnifiedAddressing, 1/*true*/));
}
/**
@@ -375,7 +374,7 @@ using AttributeToStringMap = std::array<std::pair<hipDeviceAttribute_t, const ch
namespace {
constexpr AttributeToStringMap<56> kCommonAttributes{{
constexpr AttributeToStringMap<57> kCommonAttributes{{
{hipDeviceAttributeEccEnabled, "hipDeviceAttributeEccEnabled"},
{hipDeviceAttributeCanMapHostMemory, "hipDeviceAttributeCanMapHostMemory"},
{hipDeviceAttributeClockRate, "hipDeviceAttributeClockRate"},
@@ -436,12 +435,13 @@ constexpr AttributeToStringMap<56> kCommonAttributes{{
{hipDeviceAttributeTotalGlobalMem, "hipDeviceAttributeTotalGlobalMem"},
{hipDeviceAttributeWarpSize, "hipDeviceAttributeWarpSize"},
{hipDeviceAttributeMemoryPoolsSupported, "hipDeviceAttributeMemoryPoolsSupported"},
{hipDeviceAttributeUnifiedAddressing, "hipDeviceAttributeUnifiedAddressing"},
{hipDeviceAttributeVirtualMemoryManagementSupported,
"hipDeviceAttributeVirtualMemoryManagementSupported"}
}};
#if HT_NVIDIA
constexpr AttributeToStringMap<34> kCudaOnlyAttributes{
constexpr AttributeToStringMap<33> kCudaOnlyAttributes{
{{hipDeviceAttributeAccessPolicyMaxWindowSize, "hipDeviceAttributeAccessPolicyMaxWindowSize"},
{hipDeviceAttributeAsyncEngineCount, "hipDeviceAttributeAsyncEngineCount"},
{hipDeviceAttributeCanUseHostPointerForRegisteredMem,
@@ -476,7 +476,6 @@ constexpr AttributeToStringMap<34> kCudaOnlyAttributes{
{hipDeviceAttributeStreamPrioritiesSupported, "hipDeviceAttributeStreamPrioritiesSupported"},
{hipDeviceAttributeSurfaceAlignment, "hipDeviceAttributeSurfaceAlignment"},
{hipDeviceAttributeTccDriver, "hipDeviceAttributeTccDriver"},
{hipDeviceAttributeUnifiedAddressing, "hipDeviceAttributeUnifiedAddressing"},
{hipDeviceAttributeUuid, "hipDeviceAttributeUuid"}}};
#endif
@@ -555,4 +554,4 @@ TEST_CASE("Print_Out_Attributes") {
#endif
std::flush(std::cout);
}
}