Skip to content

[UR][L0] Remove dead image code for int/unit format type #18967

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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from
Open
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
32 changes: 6 additions & 26 deletions unified-runtime/source/adapters/level_zero/image_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,41 +166,21 @@ ur_result_t ze2urImageFormat(const ze_image_format_t &ZeImageFormat,
ur_image_channel_type_t ChannelType;
switch (ZeImageFormat.type) {
case ZE_IMAGE_FORMAT_TYPE_UINT:
switch (ZeImageFormatTypeSize) {
case 8:
if (ZeImageFormatTypeSize == 8) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8;
break;
case 16:
} else if (ZeImageFormatTypeSize == 16) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16;
break;
case 32:
} else if (ZeImageFormatTypeSize == 32) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32;
break;
default:
UR_LOG(ERR,
"ze2urImageFormat: unexpected image format type size: size "
"= {}",
ZeImageFormatTypeSize);
return UR_RESULT_ERROR_INVALID_VALUE;
}
break;
case ZE_IMAGE_FORMAT_TYPE_SINT:
switch (ZeImageFormatTypeSize) {
case 8:
if (ZeImageFormatTypeSize == 8) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_SIGNED_INT8;
break;
case 16:
} else if (ZeImageFormatTypeSize == 16) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_SIGNED_INT16;
break;
case 32:
} else if (ZeImageFormatTypeSize == 32) {
ChannelType = UR_IMAGE_CHANNEL_TYPE_SIGNED_INT32;
break;
default:
UR_LOG(ERR,
"ze2urImageFormat: unexpected image format type size: size "
"= {}",
ZeImageFormatTypeSize);
return UR_RESULT_ERROR_INVALID_VALUE;
}
break;
case ZE_IMAGE_FORMAT_TYPE_UNORM:
Expand Down