Merge pull request #1073 from kpyzhov/multi-thread-device-test
hipMultiThreadDevice test: Reduced maximum number of created HIP stre…
[ROCm/hip commit: 98ab402fcb]
Этот коммит содержится в:
@@ -9,6 +9,11 @@
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MAX_BURST_SIZE 40
|
||||
#else
|
||||
#define MAX_BURST_SIZE 100
|
||||
#endif
|
||||
|
||||
// Create a lot of streams and then destroy 'em.
|
||||
void createThenDestroyStreams(int iterations, int burstSize) {
|
||||
@@ -50,8 +55,8 @@ void waitStreams(int iterations) {
|
||||
// Some create many queue, some not many.
|
||||
//
|
||||
void multiThread_pyramid(bool serialize, int iters) {
|
||||
printf("%s creating %d streams\n", __func__, iters * 100);
|
||||
std::thread t1(createThenDestroyStreams, iters * 1, 100);
|
||||
printf("%s creating %d streams\n", __func__, iters * MAX_BURST_SIZE);
|
||||
std::thread t1(createThenDestroyStreams, iters * 1, MAX_BURST_SIZE);
|
||||
if (serialize) {
|
||||
t1.join();
|
||||
printf("t1 done\n");
|
||||
|
||||
Ссылка в новой задаче
Block a user