@@ -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,13 +71,9 @@ 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);
@@ -88,10 +84,9 @@ void init_gpu_hw_info(impl::engine_t *engine, cl_device_id device,
88
84
}
89
85
90
86
ip_version = 0 ;
91
- if (clGetDeviceInfo (device, CL_DEVICE_IP_VERSION_INTEL, sizeof (ip_version),
92
- &ip_version, nullptr )
93
- != CL_SUCCESS)
94
- ip_version = 0 ;
87
+ OCL_CHECK (clGetDeviceInfo (device, CL_DEVICE_IP_VERSION_INTEL,
88
+ sizeof (ip_version), &ip_version, nullptr ));
89
+ return status::success;
95
90
}
96
91
97
92
} // namespace ocl
0 commit comments