SWDEV-1 - Fix warnings and update disabled test list (#163)

- Fix warnings in some test cases due to unused variables or signed/unsigned comparison.
- Disabled vulkan tests on MI200.

[ROCm/hip-tests commit: 88fbbd666b]
Этот коммит содержится в:
Maneesh Gupta
2023-02-09 18:52:27 +05:30
коммит произвёл GitHub
родитель aa1a82b9f0
Коммит e19e50052d
6 изменённых файлов: 24 добавлений и 9 удалений
+12 -1
Просмотреть файл
@@ -8,7 +8,18 @@
"Unit_BuiltinAtomicsRTC_fmaxCoherentGlobalMem",
"Unit_BuiltinAtomicsRTC__fminCoherentGlobalMem",
"Unit_BuiltInAtomicAdd_CoherentGlobalMemWithRtc",
"Unit_hipMemGetAddressRange_Negative"
"Unit_hipMemGetAddressRange_Negative",
"Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Positive_Read_Write",
"Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters",
"Unit_hipImportExternalMemory_Vulkan_Negative_Parameters",
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore",
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores",
"Unit_hipWaitExternalSemaphoresAsync_Vulkan_Negative_Parameters",
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Binary_Semaphore",
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Positive_Multiple_Semaphores",
"Unit_hipSignalExternalSemaphoresAsync_Vulkan_Negative_Parameters",
"Unit_hipImportExternalSemaphore_Vulkan_Negative_Parameters",
"Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters"
]
}
+3 -3
Просмотреть файл
@@ -148,10 +148,10 @@ TEST_CASE("Unit_hipMemAdvise_Rounding") {
unsigned int attribute = 0;
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
reinterpret_cast<void*>(base), rounded_up));
REQUIRE(device == attribute);
REQUIRE(device == static_cast<int>(attribute));
HIP_CHECK(hipMemRangeGetAttribute(&attribute, sizeof(attribute), hipMemRangeAttributeAccessedBy,
alloc.ptr(), 3 * kPageSize));
REQUIRE((rounded_up == 3 * kPageSize ? device : hipInvalidDeviceId) == attribute);
REQUIRE((rounded_up == 3 * kPageSize ? device : hipInvalidDeviceId) == static_cast<int>(attribute));
}
TEST_CASE("Unit_hipMemAdvise_Flags_Do_Not_Cause_Prefetch") {
@@ -193,7 +193,7 @@ TEST_CASE("Unit_hipMemAdvise_Read_Write_After_Advise") {
std::fill_n(alloc.ptr(), count, -1);
ArrayFindIfNot(alloc.ptr(), -1, count);
for (int i = 0; i < supported_devices.size(); ++i) {
for (int i = 0; i < static_cast<int>(supported_devices.size()); ++i) {
HIP_CHECK(hipSetDevice(supported_devices[i]));
VectorIncrement<<<count / 1024 + 1, 1024>>>(alloc.ptr(), 1, count);
HIP_CHECK(hipGetLastError());
-2
Просмотреть файл
@@ -213,12 +213,10 @@ TEST_CASE("Unit_hipPointerGetAttributes_Basic") {
char* A_d;
char* A_Pinned_h;
char* A_OSAlloc_h;
hipError_t e;
HIP_CHECK(hipMalloc(&A_d, Nbytes));
HIP_CHECK(hipHostMalloc(reinterpret_cast<void**>(&A_Pinned_h), Nbytes, hipHostMallocDefault));
A_OSAlloc_h = reinterpret_cast<char*>(malloc(Nbytes));
size_t free, total;
HIP_CHECK(hipMemGetInfo(&free, &total));
+3 -1
Просмотреть файл
@@ -21,7 +21,9 @@ THE SOFTWARE.
#include "vulkan_test.hh"
#if HT_AMD && 0
constexpr bool enable_validation = false;
#endif
TEST_CASE("Unit_hipDestroyExternalMemory_Vulkan_Negative_Parameters") {
SECTION("extMem == nullptr") {
@@ -42,4 +44,4 @@ TEST_CASE("Unit_hipDestroyExternalMemory_Vulkan_Negative_Parameters") {
HIP_CHECK_ERROR(hipDestroyExternalMemory(ext_memory), hipErrorInvalidValue);
}
#endif
}
}
+3 -1
Просмотреть файл
@@ -112,7 +112,9 @@ TEST_CASE("Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters") {
hipExternalMemoryBufferDesc external_mem_buffer_desc = {};
external_mem_buffer_desc.size = vk_storage.size;
#if HT_NVIDIA
void* hip_dev_ptr = nullptr;
#endif
// Disabled on AMD due to defect - EXSWHTEC-176
#if HT_NVIDIA
@@ -150,4 +152,4 @@ TEST_CASE("Unit_hipExternalMemoryGetMappedBuffer_Vulkan_Negative_Parameters") {
hipErrorInvalidValue);
}
#endif
}
}
+3 -1
Просмотреть файл
@@ -25,9 +25,11 @@ constexpr bool enable_validation = false;
TEST_CASE("Unit_hipImportExternalMemory_Vulkan_Negative_Parameters") {
VulkanTest vkt(enable_validation);
#if HT_NVIDIA
const auto storage = vkt.CreateMappedStorage<int>(1, VK_BUFFER_USAGE_TRANSFER_DST_BIT, true);
auto desc = vkt.BuildMemoryDescriptor(storage.memory, sizeof(*storage.host_ptr));
hipExternalMemory_t ext_memory;
#endif
// Disabled due to defect - EXSWHTEC-182
#if HT_NVIDIA
@@ -73,4 +75,4 @@ TEST_CASE("Unit_hipImportExternalMemory_Vulkan_Negative_Parameters") {
HIP_CHECK_ERROR(hipImportExternalMemory(&ext_memory, &desc), hipErrorInvalidValue);
}
#endif
}
}