Skip to content

Commit

Permalink
gpu: intel: sycl: fix gcc 8.5 warnings on l0 object initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mgouicem committed Jan 16, 2025
1 parent 1d4dddb commit 3744e21
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions src/gpu/intel/sycl/l0/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,22 +293,27 @@ bool compare_ze_devices(const ::sycl::device &lhs, const ::sycl::device &rhs) {
}

status_t get_device_ip(ze_device_handle_t device, uint32_t &ip_version) {
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_device_ip_version_ext_t devicePropsIP
= {ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT};
auto devicePropsIP = ze_device_ip_version_ext_t();
devicePropsIP.stype = ZE_STRUCTURE_TYPE_DEVICE_IP_VERSION_EXT;

auto deviceProps = ze_device_properties_t();
deviceProps.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
deviceProps.pNext = &devicePropsIP;

CHECK(func_zeDeviceGetProperties(device, &deviceProps));
ip_version = devicePropsIP.ipVersion;
return status::success;
}

status_t get_l0_device_enabled_systolic_intel(
ze_device_handle_t device, bool &mayiuse_systolic) {
ze_device_module_properties_t deviceModProps
= {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
// Note: supported by Intel Driver 24.05 and onwards
ze_intel_device_module_dp_exp_properties_t deviceModPropsExt
= {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
auto deviceModPropsExt = ze_intel_device_module_dp_exp_properties_t();
deviceModPropsExt.stype
= ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES;

auto deviceModProps = ze_device_module_properties_t();
deviceModProps.stype = ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES;
deviceModProps.pNext = &deviceModPropsExt;

CHECK(func_zeDeviceGetModuleProperties(device, &deviceModProps));
Expand All @@ -321,10 +326,13 @@ status_t get_l0_device_enabled_native_float_atomics(
ze_device_handle_t device, uint64_t native_extensions) {
using namespace gpu::intel::compute;

ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_float_atomic_ext_properties_t fltAtom
= {ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES};
auto fltAtom = ze_float_atomic_ext_properties_t();
fltAtom.stype = ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES;

auto deviceProps = ze_device_properties_t();
deviceProps.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
deviceProps.pNext = &fltAtom;

CHECK(func_zeDeviceGetProperties(device, &deviceProps));

ze_device_fp_atomic_ext_flags_t atomic_load_store
Expand Down Expand Up @@ -362,8 +370,9 @@ status_t get_l0_device_enabled_native_float_atomics(
}

status_t get_l0_device_eu_count(ze_device_handle_t device, int &eu_count) {
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
ze_eu_count_ext_t eucnt = ze_eu_count_ext_t();
auto eucnt = ze_eu_count_ext_t();
auto deviceProps = ze_device_properties_t();
deviceProps.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
deviceProps.pNext = &eucnt;

CHECK(func_zeDeviceGetProperties(device, &deviceProps));
Expand Down

0 comments on commit 3744e21

Please sign in to comment.