From 9a3db395116c36f5ef7137c6bdbf630a5ba156a2 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Fri, 15 Mar 2024 00:52:07 -0700 Subject: [PATCH] [L0][Bindless Image] Fix pixel size of half type This PR makes sampling_2D_half.cpp passing on DG2. --- source/adapters/level_zero/image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/adapters/level_zero/image.cpp b/source/adapters/level_zero/image.cpp index 582121d91a..bed1ce2a03 100644 --- a/source/adapters/level_zero/image.cpp +++ b/source/adapters/level_zero/image.cpp @@ -409,9 +409,9 @@ uint32_t getPixelSizeBytes(const ur_image_format_t *Format) { case UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16: case UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565: case UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555: + case UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT: ChannelTypeSizeInBytes = 2; break; - case UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT: case UR_IMAGE_CHANNEL_TYPE_INT_101010: case UR_IMAGE_CHANNEL_TYPE_SIGNED_INT32: case UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32: