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]
Этот коммит содержится в:
@@ -21,8 +21,8 @@ THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* HIT_START
|
||||
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
|
||||
* TEST: %t EXCLUDE_HIP_PLATFORM amd
|
||||
* BUILD: %t %s ../../test_common.cpp
|
||||
* TEST: %t
|
||||
* HIT_END
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,12 @@ THE SOFTWARE.
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#define THREADS 8
|
||||
#define THREADS 2 // threads per core
|
||||
#define MAX_NUM_THREADS 512
|
||||
#define ITER 100
|
||||
#define ITER 5 // total loop number
|
||||
|
||||
// 5 loops and 2 threads per core are enough for function verification.
|
||||
// You may adjust them for your test purpose.
|
||||
|
||||
extern "C" __global__ void WaitKernel(int *Ad, int clockrate) {
|
||||
uint64_t wait_t = 500,
|
||||
@@ -73,7 +76,9 @@ int main(int argc, char* argv[]) {
|
||||
hipEventCreate(&start);
|
||||
std::thread t[NUM_THREADS];
|
||||
|
||||
printf("NUM_THREADS=%d\n", NUM_THREADS);
|
||||
for (int i = 0; i < ITER; i++) {
|
||||
printf("loop %d/%d\n", i, ITER);
|
||||
for (int j = 0; j < NUM_THREADS; j++) {
|
||||
t[j] = std::thread(t1, start, stream1, clkRate, A[j], Ad[j]);
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user