From b9f97ec3feb7c9fd6c70a1ea4c7833d0956c97a9 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 10 Feb 2020 17:23:58 -0600 Subject: [PATCH] Skip test on cuda --- .../module/hipModuleLoadDataMultThreaded.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp b/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp index 3b22176927..03a2b82b8b 100644 --- a/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp +++ b/tests/src/runtimeApi/module/hipModuleLoadDataMultThreaded.cpp @@ -18,7 +18,7 @@ THE SOFTWARE. */ /* HIT_START - * BUILD: %t %s ../../test_common.cpp NVCC_OPTIONS -std=c++11 + * BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvcc * TEST: %t * HIT_END */ @@ -35,11 +35,7 @@ THE SOFTWARE. #define LEN 64 #define SIZE LEN << 2 -#ifdef __CUDACC__ -#define THREADS 1 -#else #define THREADS 8 -#endif #define FILENAME "vcpy_kernel.code" #define kernel_name "hello_world" @@ -128,31 +124,19 @@ struct joinable_thread : std::thread } }; -hipCtx_t create_context() { - hipDevice_t device; - HIPCHECK(hipDeviceGet(&device, 0)); - - hipCtx_t ctx; - HIPCHECK(hipCtxCreate(&ctx, 0, device)); - return ctx; -} - void run_multi_threads(uint32_t n) { - auto ctx = create_context(); std::vector mf(n); { auto buffer = load_file(); std::vector threads; for (uint32_t i = 0; i < n; i++) { threads.emplace_back(std::thread{[&, i, buffer] { - HIPCHECK(hipCtxSetCurrent(ctx)); mf[i] = load(buffer); }}); } } for(auto&& x:mf) run(x); - hipCtxDestroy(ctx); } int main() {