@@ -55,7 +55,7 @@ xpu::runtime_version_t get_driver_version(cl_device_id device) {
55
55
return runtime_version;
56
56
}
57
57
58
- void init_gpu_hw_info (impl::engine_t *engine, cl_device_id device,
58
+ status_t init_gpu_hw_info (impl::engine_t *engine, cl_device_id device,
59
59
cl_context context, uint32_t &ip_version, compute::gpu_arch_t &gpu_arch,
60
60
int &gpu_product_family, int &stepping_id, uint64_t &native_extensions,
61
61
bool &mayiuse_systolic, bool &mayiuse_ngen_kernels) {
@@ -71,23 +71,18 @@ void init_gpu_hw_info(impl::engine_t *engine, cl_device_id device,
71
71
stepping_id = product.stepping ;
72
72
73
73
mayiuse_systolic = false ;
74
- status_t ret
75
- = get_ocl_device_enabled_systolic_intel (device, mayiuse_systolic);
76
- assert (ret == CL_SUCCESS);
77
- ret = get_ocl_device_enabled_native_float_atomics (
78
- device, native_extensions, is_xelpg);
79
- assert (ret == CL_SUCCESS);
80
- MAYBE_UNUSED (ret);
74
+ CHECK (get_ocl_device_enabled_systolic_intel (device, mayiuse_systolic));
75
+ CHECK (get_ocl_device_enabled_native_float_atomics (
76
+ device, native_extensions, is_xelpg));
81
77
82
78
auto status
83
79
= jit::gpu_supports_binary_format (&mayiuse_ngen_kernels, engine);
84
80
if (status != status::success) mayiuse_ngen_kernels = false ;
85
81
86
82
ip_version = 0 ;
87
- if (clGetDeviceInfo (device, CL_DEVICE_IP_VERSION_INTEL, sizeof (ip_version),
88
- &ip_version, nullptr )
89
- != CL_SUCCESS)
90
- ip_version = 0 ;
83
+ OCL_CHECK (clGetDeviceInfo (device, CL_DEVICE_IP_VERSION_INTEL,
84
+ sizeof (ip_version), &ip_version, nullptr ));
85
+ return status::success;
91
86
}
92
87
93
88
} // namespace ocl
0 commit comments