File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -407,6 +407,13 @@ if(UMF_BUILD_GPU_TESTS AND UMF_BUILD_CUDA_PROVIDER)
407
407
endif ()
408
408
endif ()
409
409
410
+ if (NOT UMF_BUILD_CUDA_PROVIDER )
411
+ add_umf_test (
412
+ NAME provider_cuda_not_impl
413
+ SRCS providers/provider_cuda_not_impl.cpp
414
+ LIBS ${UMF_UTILS_FOR_TEST} )
415
+ endif ()
416
+
410
417
add_umf_test (
411
418
NAME base_alloc
412
419
SRCS ${BA_SOURCES_FOR_TEST} test_base_alloc.cpp
Original file line number Diff line number Diff line change
1
+ // Copyright (C) 2024 Intel Corporation
2
+ // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
+
5
+ #include " base.hpp"
6
+
7
+ #include < umf/providers/provider_cuda.h>
8
+
9
+ using umf_test::test;
10
+
11
+ TEST_F (test, cuda_provider_not_implemented) {
12
+ umf_cuda_memory_provider_params_handle_t hParams = nullptr ;
13
+ umf_result_t result = umfCUDAMemoryProviderParamsCreate (&hParams);
14
+ ASSERT_EQ (result, UMF_RESULT_ERROR_NOT_SUPPORTED);
15
+
16
+ result = umfCUDAMemoryProviderParamsDestroy (hParams);
17
+ ASSERT_EQ (result, UMF_RESULT_ERROR_NOT_SUPPORTED);
18
+
19
+ result = umfCUDAMemoryProviderParamsSetContext (hParams, nullptr );
20
+ ASSERT_EQ (result, UMF_RESULT_ERROR_NOT_SUPPORTED);
21
+
22
+ result = umfCUDAMemoryProviderParamsSetDevice (hParams, 0 );
23
+ ASSERT_EQ (result, UMF_RESULT_ERROR_NOT_SUPPORTED);
24
+
25
+ result = umfCUDAMemoryProviderParamsSetMemoryType (hParams,
26
+ UMF_MEMORY_TYPE_DEVICE);
27
+ ASSERT_EQ (result, UMF_RESULT_ERROR_NOT_SUPPORTED);
28
+
29
+ umf_memory_provider_ops_t *ops = umfCUDAMemoryProviderOps ();
30
+ ASSERT_EQ (ops, nullptr );
31
+ }
You can’t perform that action at this time.
0 commit comments