diff --git a/source/adapters/level_zero/kernel.cpp b/source/adapters/level_zero/kernel.cpp index 49d6123532..9c201eda88 100644 --- a/source/adapters/level_zero/kernel.cpp +++ b/source/adapters/level_zero/kernel.cpp @@ -746,7 +746,7 @@ ur_result_t urKernelGetInfo( char *attributes = new char[Size]; ZE2UR_CALL(zeKernelGetSourceAttributes, (Kernel->ZeKernel, &Size, &attributes)); - auto Res = ReturnValue(attributes); + auto Res = ReturnValue(static_cast(attributes)); delete[] attributes; return Res; } catch (const std::bad_alloc &) { diff --git a/test/conformance/kernel/urKernelGetInfo.cpp b/test/conformance/kernel/urKernelGetInfo.cpp index f08e13d079..e87ab1da13 100644 --- a/test/conformance/kernel/urKernelGetInfo.cpp +++ b/test/conformance/kernel/urKernelGetInfo.cpp @@ -46,6 +46,22 @@ TEST_P(urKernelGetInfoTest, Success) { ASSERT_GT(*returned_reference_count, 0U); break; } + case UR_KERNEL_INFO_ATTRIBUTES: { + auto returned_attributes = std::string(property_value.data()); + ur_platform_backend_t backend; + ASSERT_SUCCESS(urPlatformGetInfo(platform, UR_PLATFORM_INFO_BACKEND, + sizeof(backend), &backend, nullptr)); + if (backend == UR_PLATFORM_BACKEND_OPENCL || + backend == UR_PLATFORM_BACKEND_LEVEL_ZERO) { + // Older intel drivers don't attach any default attributes and newer ones force walk order to X/Y/Z using special attribute. + ASSERT_TRUE(returned_attributes.empty() || + returned_attributes == + "intel_reqd_workgroup_walk_order(0,1,2)"); + } else { + ASSERT_TRUE(returned_attributes.empty()); + } + break; + } default: break; }