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.
This commit is contained in:
Ben Ashbaugh
2025-09-16 11:37:49 -07:00
committed by GitHub
parent f308540828
commit 56802afb17
2 changed files with 14 additions and 21 deletions

View File

@@ -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);
}
}
}

View File

@@ -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 <typename T>
std::unique_ptr<USVMWrapper<T>> get_hostptr_usvm_wrapper()
{
return std::unique_ptr<USVMWrapper<T>>(
new USVMWrapper<T>(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)
{