File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -746,7 +746,7 @@ ur_result_t urKernelGetInfo(
746
746
char *attributes = new char [Size];
747
747
ZE2UR_CALL (zeKernelGetSourceAttributes,
748
748
(Kernel->ZeKernel , &Size, &attributes));
749
- auto Res = ReturnValue (attributes);
749
+ auto Res = ReturnValue (static_cast < const char *>( attributes) );
750
750
delete[] attributes;
751
751
return Res;
752
752
} catch (const std::bad_alloc &) {
Original file line number Diff line number Diff line change @@ -46,6 +46,22 @@ TEST_P(urKernelGetInfoTest, Success) {
46
46
ASSERT_GT (*returned_reference_count, 0U );
47
47
break ;
48
48
}
49
+ case UR_KERNEL_INFO_ATTRIBUTES: {
50
+ auto returned_attributes = std::string (property_value.data ());
51
+ ur_platform_backend_t backend;
52
+ ASSERT_SUCCESS (urPlatformGetInfo (platform, UR_PLATFORM_INFO_BACKEND,
53
+ sizeof (backend), &backend, nullptr ));
54
+ if (backend == UR_PLATFORM_BACKEND_OPENCL ||
55
+ backend == UR_PLATFORM_BACKEND_LEVEL_ZERO) {
56
+ // Older intel drivers don't attach any default attributes and newer ones force walk order to X/Y/Z using special attribute.
57
+ ASSERT_TRUE (returned_attributes.empty () ||
58
+ returned_attributes ==
59
+ " intel_reqd_workgroup_walk_order(0,1,2)" );
60
+ } else {
61
+ ASSERT_TRUE (returned_attributes.empty ());
62
+ }
63
+ break ;
64
+ }
49
65
default :
50
66
break ;
51
67
}
You can’t perform that action at this time.
0 commit comments