From 67ba110e4faa6a844db69234316f8957262ab676 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Mon, 30 Oct 2023 10:50:20 +0000 Subject: [PATCH] SWDEV-425248 - Fix Unit_ChannelDescriptor_Positive for long. Limit checks for long based on __LP64__ macro. Changes are required after below PR got merged. https://gerrit-git.amd.com/c/compute/ec/clr/+/870326 Change-Id: I51cbaf087a7ba98a441348a13091b92dbb97df21 [ROCm/hip-tests commit: e5d82f128d1006f8ad526d07501e2b3eaf8c0f28] --- .../catch/hipTestMain/config/config_amd_linux | 10 ---------- .../hipTestMain/config/config_amd_windows | 12 ----------- .../channel_descriptor_common.hh | 20 +++++++++++++++---- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index aa1a4e60e9..6e94f13c55 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -118,16 +118,6 @@ "Unit_hipMemcpyParam2DAsync_multiDevice-StreamOnDiffDevice", "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/96 ===", "Unit_hipHostGetDevicePointer_Negative", - "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/215 ===", - "Unit_ChannelDescriptor_Positive_Basic_1D - long", - "Unit_ChannelDescriptor_Positive_Basic_1D - unsigned long", - "Unit_ChannelDescriptor_Positive_Basic_1D - ulong1", - "Unit_ChannelDescriptor_Positive_Basic_1D - signed long", - "Unit_ChannelDescriptor_Positive_Basic_1D - long1", - "Unit_ChannelDescriptor_Positive_Basic_2D - ulong2", - "Unit_ChannelDescriptor_Positive_Basic_2D - long2", - "Unit_ChannelDescriptor_Positive_Basic_4D - ulong4", - "Unit_ChannelDescriptor_Positive_Basic_4D - long4", "Unit_hipExtModuleLaunchKernel_NonUniformWorkGroup", "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/18 ===", "Unit_hipMemcpyAsync_Negative_Parameters", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows index 402ff4ad32..d1b1b1cec0 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows @@ -207,18 +207,6 @@ "Unit_hipDeviceGetUuid_Positive", "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/96 ===", "Unit_hipHostGetDevicePointer_Negative", - "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/215 ===", - "Unit_ChannelDescriptor_Positive_Basic_1D - long", - "Unit_ChannelDescriptor_Positive_Basic_1D - unsigned long", - "Unit_ChannelDescriptor_Positive_Basic_1D - ulong1", - "Unit_ChannelDescriptor_Positive_Basic_1D - signed long", - "Unit_ChannelDescriptor_Positive_Basic_1D - long1", - "Unit_ChannelDescriptor_Positive_Basic_2D - ulong2", - "Unit_ChannelDescriptor_Positive_Basic_2D - long2", - "Unit_ChannelDescriptor_Positive_Basic_3D - ulong3", - "Unit_ChannelDescriptor_Positive_Basic_3D - long3", - "Unit_ChannelDescriptor_Positive_Basic_4D - ulong4", - "Unit_ChannelDescriptor_Positive_Basic_4D - long4", "Unit_hipExtModuleLaunchKernel_NonUniformWorkGroup", "=== Below tests fail in external CI for PR https://github.com/ROCm-Developer-Tools/hip-tests/pull/18 ===", "Unit_hipMemcpyAsync_Negative_Parameters", diff --git a/projects/hip-tests/catch/unit/channelDescriptor/channel_descriptor_common.hh b/projects/hip-tests/catch/unit/channelDescriptor/channel_descriptor_common.hh index 47e87025be..332075a5bb 100644 --- a/projects/hip-tests/catch/unit/channelDescriptor/channel_descriptor_common.hh +++ b/projects/hip-tests/catch/unit/channelDescriptor/channel_descriptor_common.hh @@ -88,7 +88,9 @@ template class ChannelDescriptorTest1D : public ChannelDescriptorTe } else if (std::is_same_v || std::is_same_v) { this->size = static_cast(sizeof(float) * 8); this->kind = hipChannelFormatKindFloat; - } else if (std::is_same_v || std::is_same_v) { + } + #if !defined(__LP64__) + else if (std::is_same_v || std::is_same_v) { this->size = static_cast(sizeof(unsigned long) * 8); this->kind = hipChannelFormatKindUnsigned; } else if (std::is_same_v || std::is_same_v || @@ -96,6 +98,7 @@ template class ChannelDescriptorTest1D : public ChannelDescriptorTe this->size = static_cast(sizeof(signed long) * 8); this->kind = hipChannelFormatKindSigned; } + #endif } }; @@ -126,13 +129,16 @@ template class ChannelDescriptorTest2D : public ChannelDescriptorTe } else if (std::is_same_v) { this->size = static_cast(sizeof(float) * 8); this->kind = hipChannelFormatKindFloat; - } else if (std::is_same_v) { + } + #if !defined(__LP64__) + else if (std::is_same_v) { this->size = static_cast(sizeof(unsigned long) * 8); this->kind = hipChannelFormatKindUnsigned; } else if (std::is_same_v) { this->size = static_cast(sizeof(signed long) * 8); this->kind = hipChannelFormatKindSigned; } + #endif } }; @@ -164,13 +170,16 @@ template class ChannelDescriptorTest3D : public ChannelDescriptorTe } else if (std::is_same_v) { this->size = static_cast(sizeof(float) * 8); this->kind = hipChannelFormatKindFloat; - } else if (std::is_same_v) { + } + #if !defined(__LP64__) + else if (std::is_same_v) { this->size = static_cast(sizeof(unsigned long) * 8); this->kind = hipChannelFormatKindUnsigned; } else if (std::is_same_v) { this->size = static_cast(sizeof(signed long) * 8); this->kind = hipChannelFormatKindSigned; } + #endif } }; #endif @@ -202,13 +211,16 @@ template class ChannelDescriptorTest4D : public ChannelDescriptorTe } else if (std::is_same_v) { this->size = static_cast(sizeof(float) * 8); this->kind = hipChannelFormatKindFloat; - } else if (std::is_same_v) { + } + #if !defined(__LP64__) + else if (std::is_same_v) { this->size = static_cast(sizeof(unsigned long) * 8); this->kind = hipChannelFormatKindUnsigned; } else if (std::is_same_v) { this->size = static_cast(sizeof(signed long) * 8); this->kind = hipChannelFormatKindSigned; } + #endif } };