Skip to content

Commit a87ae56

Browse files
committed
fix GPU providers config in compat wflows
1 parent e9fdb84 commit a87ae56

File tree

3 files changed

+16
-71
lines changed

3 files changed

+16
-71
lines changed

.github/workflows/pr_push.yml

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,85 +17,27 @@ permissions:
1717
packages: read
1818

1919
jobs:
20-
CodeChecks:
21-
uses: ./.github/workflows/reusable_checks.yml
22-
FastBuild:
23-
name: Fast builds
24-
needs: [CodeChecks]
25-
uses: ./.github/workflows/reusable_fast.yml
26-
Build:
27-
name: Basic builds
28-
needs: [FastBuild]
29-
uses: ./.github/workflows/reusable_basic.yml
30-
DevDax:
31-
needs: [FastBuild]
32-
uses: ./.github/workflows/reusable_dax.yml
33-
MultiNuma:
34-
needs: [FastBuild]
35-
uses: ./.github/workflows/reusable_multi_numa.yml
3620
L0:
37-
needs: [Build]
3821
uses: ./.github/workflows/reusable_gpu.yml
3922
with:
4023
provider: "LEVEL_ZERO"
4124
runner: "L0"
4225
shared_lib: "['ON']"
4326
L0-BMG:
44-
needs: [Build]
4527
uses: ./.github/workflows/reusable_gpu.yml
4628
with:
4729
provider: "LEVEL_ZERO"
4830
runner: "L0-BMG"
4931
shared_lib: "['ON']"
5032
os: "['Ubuntu']"
5133
CUDA:
52-
needs: [Build]
34+
5335
uses: ./.github/workflows/reusable_gpu.yml
5436
with:
5537
provider: "CUDA"
5638
runner: "CUDA"
5739
shared_lib: "['ON']"
58-
Sanitizers:
59-
needs: [FastBuild]
60-
uses: ./.github/workflows/reusable_sanitizers.yml
61-
QEMU:
62-
needs: [FastBuild]
63-
uses: ./.github/workflows/reusable_qemu.yml
64-
with:
65-
short_run: true
66-
ProxyLib:
67-
needs: [Build]
68-
uses: ./.github/workflows/reusable_proxy_lib.yml
69-
Valgrind:
70-
needs: [Build]
71-
uses: ./.github/workflows/reusable_valgrind.yml
72-
Coverage:
73-
# total coverage (on upstream only)
74-
if: github.repository == 'oneapi-src/unified-memory-framework'
75-
needs: [Build, DevDax, L0, CUDA, MultiNuma, QEMU, ProxyLib]
76-
uses: ./.github/workflows/reusable_coverage.yml
77-
secrets: inherit
78-
with:
79-
trigger: "${{github.event_name}}"
80-
Coverage_partial:
81-
# partial coverage (on forks)
82-
if: github.repository != 'oneapi-src/unified-memory-framework'
83-
needs: [Build, QEMU, ProxyLib]
84-
uses: ./.github/workflows/reusable_coverage.yml
85-
CodeQL:
86-
needs: [Build]
87-
permissions:
88-
contents: read
89-
security-events: write
90-
uses: ./.github/workflows/reusable_codeql.yml
91-
Trivy:
92-
needs: [Build]
93-
permissions:
94-
contents: read
95-
security-events: write
96-
uses: ./.github/workflows/reusable_trivy.yml
9740
Compatibility:
98-
needs: [Build]
9941
uses: ./.github/workflows/reusable_compatibility.yml
10042
strategy:
10143
matrix:

.github/workflows/reusable_compatibility.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ jobs:
281281
-DCMAKE_C_COMPILER=gcc
282282
-DCMAKE_CXX_COMPILER=g++
283283
-DUMF_BUILD_TESTS=OFF
284-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
285-
-DUMF_BUILD_CUDA_PROVIDER=ON
284+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.provider == 'LEVEL_ZERO' && 'ON' || 'OFF' }}
285+
-DUMF_BUILD_CUDA_PROVIDER=${{matrix.provider == 'CUDA' && 'ON' || 'OFF' }}
286286
-DUMF_FORMAT_CODE_STYLE=OFF
287287
-DUMF_DEVELOPER_MODE=ON
288288
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
@@ -316,13 +316,11 @@ jobs:
316316
-DUMF_BUILD_GPU_TESTS=ON
317317
-DUMF_BUILD_EXAMPLES=ON
318318
-DUMF_BUILD_GPU_EXAMPLES=ON
319-
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
320-
-DUMF_BUILD_CUDA_PROVIDER=OFF
321-
-DUMF_BUILD_${{matrix.provider}}_PROVIDER=ON
319+
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=${{matrix.provider == 'LEVEL_ZERO' && 'ON' || 'OFF' }}
320+
-DUMF_BUILD_CUDA_PROVIDER=${{matrix.provider == 'CUDA' && 'ON' || 'OFF' }}
322321
-DUMF_FORMAT_CODE_STYLE=OFF
323322
-DUMF_DEVELOPER_MODE=ON
324323
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
325-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
326324
-DUMF_TESTS_FAIL_ON_SKIP=ON
327325
328326
- name: Build "tag" UMF

test/providers/provider_cuda_not_impl.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,28 @@ using umf_test::test;
1111
TEST_F(test, cuda_provider_not_implemented) {
1212
umf_cuda_memory_provider_params_handle_t hParams = nullptr;
1313
umf_result_t result = umfCUDAMemoryProviderParamsCreate(&hParams);
14-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
14+
ASSERT_NE(result, UMF_RESULT_SUCCESS); // note NE
15+
ASSERT_EQ(hParams, nullptr);
1516

17+
// set hParams to non-null value
18+
hParams = (umf_cuda_memory_provider_params_handle_t)0x1;
19+
20+
// when CUDA is not available, all operations should fail
1621
result = umfCUDAMemoryProviderParamsDestroy(hParams);
17-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
22+
ASSERT_NE(result, UMF_RESULT_SUCCESS);
1823

1924
result = umfCUDAMemoryProviderParamsSetContext(hParams, nullptr);
20-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
25+
ASSERT_NE(result, UMF_RESULT_SUCCESS);
2126

2227
result = umfCUDAMemoryProviderParamsSetDevice(hParams, 0);
23-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
28+
ASSERT_NE(result, UMF_RESULT_SUCCESS);
2429

2530
result = umfCUDAMemoryProviderParamsSetMemoryType(hParams,
2631
UMF_MEMORY_TYPE_DEVICE);
27-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
32+
ASSERT_NE(result, UMF_RESULT_SUCCESS);
2833

2934
result = umfCUDAMemoryProviderParamsSetAllocFlags(hParams, 0);
30-
ASSERT_EQ(result, UMF_RESULT_ERROR_NOT_SUPPORTED);
35+
ASSERT_NE(result, UMF_RESULT_SUCCESS);
3136

3237
const umf_memory_provider_ops_t *ops = umfCUDAMemoryProviderOps();
3338
ASSERT_EQ(ops, nullptr);

0 commit comments

Comments
 (0)