SWDEV-351055 - Enable hipMallocArray and hipArrayCreate happy cases, disabling a REQUIRE case (#2929)

Change-Id: Ie5eb423d1c1b9b32101c9a9fae4c372612839c4d

[ROCm/hip commit: dc386a0805]
This commit is contained in:
ROCm CI Service Account
2022-09-26 07:38:59 +05:30
committed by GitHub
parent 9ba5f64beb
commit c7294b0711
2 changed files with 0 additions and 27 deletions
@@ -212,13 +212,6 @@ void testArrayAsTexture(hiparray array, const size_t width, const size_t height)
// Test the happy path of the hipArrayCreate
TEMPLATE_TEST_CASE("Unit_hipArrayCreate_happy", "", uint, int, int4, ushort, short2, char, uchar2,
char4, float, float2, float4) {
#if HT_AMD
if (std::is_same<uint, TestType>::value || std::is_same<ushort, TestType>::value ||
std::is_same<uchar2, TestType>::value) {
HipTest::HIP_SKIP_TEST("Probably EXSWCPHIPT-62");
return;
}
#endif
using vec_info = vector_info<TestType>;
DriverContext ctx;
@@ -228,8 +221,6 @@ TEMPLATE_TEST_CASE("Unit_hipArrayCreate_happy", "", uint, int, int4, ushort, sho
desc.Width = 1024;
desc.Height = GENERATE(0, 1024);
size_t initFree = getFreeMem();
// pointer to the array in device memory
hiparray array{};
@@ -237,12 +228,6 @@ TEMPLATE_TEST_CASE("Unit_hipArrayCreate_happy", "", uint, int, int4, ushort, sho
testArrayAsTexture<TestType>(array, desc.Width, desc.Height);
size_t finalFree = getFreeMem();
const size_t allocSize = sizeof(TestType) * desc.Width * (desc.Height ? desc.Height : 1);
// will be aligned to some size, so this is not exact
REQUIRE(initFree - finalFree >= allocSize);
HIP_CHECK(hipArrayDestroy(array));
}
@@ -385,15 +385,9 @@ void testArrayAsSurface(hipArray_t arrayPtr, const size_t width, const size_t he
// Selection of types chosen to reduce compile times
TEMPLATE_TEST_CASE("Unit_hipMallocArray_happy", "", uint, int, int4, ushort, short2, char, uchar2,
char4, float, float2, float4) {
#if HT_AMD
HipTest::HIP_SKIP_TEST("EXSWCPHIPT-62");
return;
#endif
hipChannelFormatDesc desc = hipCreateChannelDesc<TestType>();
size_t init_free = getFreeMem();
// pointer to the array in device memory
hipArray_t arrayPtr{};
size_t width = 1024;
@@ -426,12 +420,6 @@ TEMPLATE_TEST_CASE("Unit_hipMallocArray_happy", "", uint, int, int4, ushort, sho
}
#endif
size_t final_free = getFreeMem();
const size_t alloc_size = getAllocSize<TestType>(width, height);
// alloc will be chunked, so this is not exact
REQUIRE(init_free - final_free >= alloc_size);
HIP_CHECK(hipFreeArray(arrayPtr));
}