From 56802afb17bf3fc5399cfa47a3d4fdb727443fb3 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Tue, 16 Sep 2025 11:37:49 -0700 Subject: [PATCH] clean up unified SVM memory fill test (#2518) Removes unused code from the unified SVM memory fill test. Adds an informational message when a unified SVM capability combination is skipped for memcpy and memfill. --- .../SVM/test_unified_svm_mem_cpy.cpp | 12 ++++++---- .../SVM/test_unified_svm_mem_fill.cpp | 23 +++++-------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/test_conformance/SVM/test_unified_svm_mem_cpy.cpp b/test_conformance/SVM/test_unified_svm_mem_cpy.cpp index e67d7684..c0c9cb26 100644 --- a/test_conformance/SVM/test_unified_svm_mem_cpy.cpp +++ b/test_conformance/SVM/test_unified_svm_mem_cpy.cpp @@ -174,10 +174,14 @@ struct UnifiedSVMOPs : UnifiedSVMBase "type %u\n", src_ti, dst_ti); err = test_svm_memcpy(src_ti, dst_ti); - if (CL_SUCCESS != err) - { - return err; - } + test_error(err, "test_svm_memcpy failed"); + } + else + { + log_info( + " skipping clEnqueueSVMMemcpy() SVM type %u -> SVM " + "type %u\n", + src_ti, dst_ti); } } } diff --git a/test_conformance/SVM/test_unified_svm_mem_fill.cpp b/test_conformance/SVM/test_unified_svm_mem_fill.cpp index a00bef42..84b58687 100644 --- a/test_conformance/SVM/test_unified_svm_mem_fill.cpp +++ b/test_conformance/SVM/test_unified_svm_mem_fill.cpp @@ -132,29 +132,18 @@ struct UnifiedSVMMemFill : UnifiedSVMBase { if (caps_compatibility_check(ti)) { - - log_info(" testing clEnqueueSVMMemFill() SVM type %u \n", ti); + log_info(" testing clEnqueueSVMMemFill() SVM type %u\n", ti); err = test_svm_memfill(ti); - if (CL_SUCCESS != err) - { - return err; - } + test_error(err, "test_svm_memfill failed"); + } + else + { + log_info(" skipping clEnqueueSVMMemFill() SVM type %u\n", ti); } } return CL_SUCCESS; } - template - std::unique_ptr> get_hostptr_usvm_wrapper() - { - return std::unique_ptr>( - new USVMWrapper(nullptr, nullptr, nullptr, CL_UINT_MAX, - CL_SVM_CAPABILITY_SYSTEM_ALLOCATED_KHR - | CL_SVM_CAPABILITY_HOST_READ_KHR - | CL_SVM_CAPABILITY_HOST_WRITE_KHR, - 0, nullptr, nullptr, nullptr, nullptr)); - } - bool caps_compatibility_check(cl_uint TypeIndex) {