SWDEV-266829 - Enable more tests on AMD and NV devices (#2336)
* SWDEV-266829 - Enable more tests on AMD and NV devices
1. Enable tests on AMD and NV devices
tests/src/runtimeApi/event/hipEventMultiThreaded.cpp
Loops and threads per core are changed smaller so that test can
finish in a shorter time.
tests/src/runtimeApi/stream/hipStreamCreateWithPriority.cpp
Fix logic error on how to get priority_normal
2. Simply enable test on AMD device
tests/src/runtimeApi/memory/hipManagedKeyword.cpp
tests/src/runtimeApi/module/hipManagedKeyword.cpp
tests/src/runtimeApi/stream/hipStreamACb_MultiThread.cpp
tests/src/runtimeApi/memory/p2p_copy_coherency.cpp
3. Simply enable test on NV device
tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp
4. Fix typo
tests/src/runtimeApi/stream/hipStreamAddCallbackCatch.cpp
5. Remove useless tests
tests/src/hipC.c
tests/src/hipHcc.cpp
Change-Id: Ia4406353e64d69bd34c58ebb56185701f7ce1caa
* Remove tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp for cuda test
Co-authored-by: anusha GodavarthySurya <Anusha.GodavarthySurya@amd.com>
Co-authored-by: Jenkins <jenkins-compute@amd.com>
[ROCm/hip commit: 3fd16c0b5b]
This commit is contained in:
@@ -22,7 +22,7 @@ THE SOFTWARE.
|
||||
// This test case is disabled currently.
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11 EXCLUDE_HIP_PLATFORM all
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS --std=c++11
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "test_common.h"
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 EXCLUDE_HIP_PLATFORM
|
||||
* BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM all
|
||||
* BUILD: %t %s ../../test_common.cpp
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ __global__ void memcpy_kernel(T* dst, T* src, size_t n)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void runTest()
|
||||
int runTest()
|
||||
{
|
||||
size_t size = NUMITERS*MEMCPYSIZE;
|
||||
|
||||
@@ -71,13 +71,16 @@ void runTest()
|
||||
printf("HIP stream priority range - low: %d to high: %d\n", priority_low, priority_high);
|
||||
|
||||
// Check if priorities are indeed supported
|
||||
if ((priority_low - priority_high) == 0) { passed(); }
|
||||
|
||||
if (priority_low == 0 && priority_high == 0) {
|
||||
printf("The device doesn't support stream priorities\n");
|
||||
passed();
|
||||
}
|
||||
|
||||
// Enable/disable priorities based on number of available priority levels
|
||||
enable_priority_low = true;
|
||||
enable_priority_high = true;
|
||||
if ((priority_low - priority_high) > 1) enable_priority_normal = true;
|
||||
if (enable_priority_normal) priority_normal = ((priority_low - priority_high) / 2);
|
||||
if (enable_priority_normal) priority_normal = ((priority_low + priority_high) / 2);
|
||||
|
||||
// create streams with highest and lowest available priorities
|
||||
#define OP(x) \
|
||||
@@ -216,5 +219,5 @@ void runTest()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
HipTest::parseStandardArguments(argc, argv, false);
|
||||
runTest<int>();
|
||||
return runTest<int>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user