From 734b90c59222460b606fe73a7abc7f41a3a76610 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 17 Feb 2020 11:16:20 +0530 Subject: [PATCH] [dtests] Fix random timeout failures in hipModuleLoadDataMultThreaded (#1877) Limit the max threads that are launched to 16. [ROCm/clr commit: 2ec55fde47f5dec911adc1c17892699781579808] --- .../src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp b/projects/clr/hipamd/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp index 8591a748df..e73bbedba5 100644 --- a/projects/clr/hipamd/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp +++ b/projects/clr/hipamd/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp @@ -36,6 +36,7 @@ THE SOFTWARE. #define LEN 64 #define SIZE LEN << 2 #define THREADS 2 +#define MAX_THREADS 16 #define FILENAME "vcpy_kernel.code" #define kernel_name "hello_world" @@ -145,7 +146,7 @@ int main() { HIPCHECK(hipInit(0)); auto buffer = load_file(); - run_multi_threads(THREADS * std::thread::hardware_concurrency(), buffer); + run_multi_threads(min(THREADS * std::thread::hardware_concurrency(), MAX_THREADS), buffer); passed(); }