Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[L0 v2] fix error reporting for urUSM*Alloc #2330

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions source/adapters/level_zero/v2/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@
namespace umf {
ur_result_t getProviderNativeError(const char *providerName,
int32_t nativeError) {
if (strcmp(providerName, "Level Zero") == 0) {
return ze2urResult(static_cast<ze_result_t>(nativeError));
if (strcmp(providerName, "LEVEL_ZERO") == 0) {
auto zeResult = static_cast<ze_result_t>(nativeError);
if (zeResult == ZE_RESULT_ERROR_UNSUPPORTED_SIZE) {
return UR_RESULT_ERROR_INVALID_USM_SIZE;
}
return ze2urResult(zeResult);
}

return UR_RESULT_ERROR_UNKNOWN;
Expand Down
3 changes: 0 additions & 3 deletions test/conformance/usm/usm_adapter_level_zero_v2.match
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
urUSMDeviceAllocTest.InvalidUSMSize/*
urUSMGetMemAllocInfoTest.Success/*___UR_USM_ALLOC_INFO_POOL
urUSMHostAllocTest.InvalidUSMSize/*
urUSMSharedAllocTest.InvalidUSMSize/*
Loading