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(
746746      char  *attributes = new  char [Size];
747747      ZE2UR_CALL (zeKernelGetSourceAttributes,
748748                 (Kernel->ZeKernel , &Size, &attributes));
749-       auto  Res = ReturnValue (attributes);
749+       auto  Res = ReturnValue (static_cast < const   char  *>( attributes) );
750750      delete[]  attributes;
751751      return  Res;
752752    } catch  (const  std::bad_alloc &) {
Original file line number Diff line number Diff line change @@ -46,6 +46,22 @@ TEST_P(urKernelGetInfoTest, Success) {
4646        ASSERT_GT (*returned_reference_count, 0U );
4747        break ;
4848    }
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+     }
4965    default :
5066        break ;
5167    }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments