From 29a257d79b48d65906a1bf3b1b314ced13af61ee Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 10 Feb 2020 13:37:45 -0600 Subject: [PATCH] Add setDevice to try and initialize the context on cuda --- tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp b/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp index 31e930086b..ff2d5b1ef3 100644 --- a/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp +++ b/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp @@ -127,6 +127,7 @@ void run_multi_threads(uint32_t n) { std::vector threads; for (uint32_t i = 0; i < n; i++) { threads.emplace_back(std::thread{[=, &mf] { + hipSetDevice(0); mf[i] = load(); }}); }