From 78ff2fb23fd0494dcf72f4a6461d457c4715da77 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Tue, 20 Aug 2024 13:56:30 +0200 Subject: [PATCH] Update bfloat16 conversion propert Signed-off-by: Anatoly Myachev --- csrc/gpu/aten/core/DeviceInfo.h | 2 +- csrc/gpu/runtime/Device.cpp | 4 ++-- csrc/gpu/runtime/DeviceProp.h | 2 +- intel_extension_for_pytorch/csrc/xpu/Module.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/csrc/gpu/aten/core/DeviceInfo.h b/csrc/gpu/aten/core/DeviceInfo.h index a0fdbe150..d3f60d1de 100644 --- a/csrc/gpu/aten/core/DeviceInfo.h +++ b/csrc/gpu/aten/core/DeviceInfo.h @@ -34,7 +34,7 @@ struct DeviceInfo { uint32_t max_num_sub_groups; std::vector sub_group_sizes; bool support_fp64; - bool has_bf16_conversion; + bool has_bfloat16_conversions; bool has_subgroup_matrix_multiply_accumulate; bool has_subgroup_matrix_multiply_accumulate_tensor_float32; bool has_subgroup_2d_block_io; diff --git a/csrc/gpu/runtime/Device.cpp b/csrc/gpu/runtime/Device.cpp index 9a76bccbd..6a715a45d 100644 --- a/csrc/gpu/runtime/Device.cpp +++ b/csrc/gpu/runtime/Device.cpp @@ -323,7 +323,7 @@ static void initDeviceProperty(DeviceId device_id) { device_prop.support_atomic64 = device.has(dpcpp_dev_aspect_atomic64); device_prop.support_fp64 = device.has(dpcpp_dev_aspect_fp64); sycl::ext::oneapi::experimental::cl_version version; - device_prop.has_bf16_conversion = device.ext_oneapi_supports_cl_extension( + device_prop.has_bfloat16_conversions = device.ext_oneapi_supports_cl_extension( "cl_intel_bfloat16_conversions", &version); device_prop.has_subgroup_matrix_multiply_accumulate = device.ext_oneapi_supports_cl_extension( @@ -369,7 +369,7 @@ static void initDeviceProperty(DeviceId device_id) { dev_info.max_num_sub_groups = device_prop.max_num_subgroup; dev_info.sub_group_sizes = device_prop.subgroup_sizes; dev_info.support_fp64 = device_prop.support_fp64; - dev_info.has_bf16_conversion = device_prop.has_bf16_conversion; + dev_info.has_bfloat16_conversions = device_prop.has_bfloat16_conversions; dev_info.has_subgroup_matrix_multiply_accumulate = device_prop.has_subgroup_matrix_multiply_accumulate; dev_info.has_subgroup_matrix_multiply_accumulate_tensor_float32 = diff --git a/csrc/gpu/runtime/DeviceProp.h b/csrc/gpu/runtime/DeviceProp.h index 2f132b371..1994d7737 100644 --- a/csrc/gpu/runtime/DeviceProp.h +++ b/csrc/gpu/runtime/DeviceProp.h @@ -143,7 +143,7 @@ struct DeviceProp { bool support_fp64; bool support_atomic64; - bool has_bf16_conversion; + bool has_bfloat16_conversions; bool has_subgroup_matrix_multiply_accumulate; bool has_subgroup_matrix_multiply_accumulate_tensor_float32; bool has_subgroup_2d_block_io; diff --git a/intel_extension_for_pytorch/csrc/xpu/Module.cpp b/intel_extension_for_pytorch/csrc/xpu/Module.cpp index 229df040e..a248a58ea 100644 --- a/intel_extension_for_pytorch/csrc/xpu/Module.cpp +++ b/intel_extension_for_pytorch/csrc/xpu/Module.cpp @@ -577,7 +577,7 @@ static void register_xpu_device_info(PyObject* module) { .def_readonly("max_num_sub_groups", &DeviceInfo::max_num_sub_groups) .def_readonly("sub_group_sizes", &DeviceInfo::sub_group_sizes) .def_readonly("has_fp64", &DeviceInfo::support_fp64) - .def_readonly("has_bf16_conversion", &DeviceInfo::has_bf16_conversion) + .def_readonly("has_bfloat16_conversions", &DeviceInfo::has_bfloat16_conversions) .def_readonly( "has_subgroup_matrix_multiply_accumulate", &DeviceInfo::has_subgroup_matrix_multiply_accumulate) @@ -599,7 +599,7 @@ static void register_xpu_device_info(PyObject* module) { << "MB, max_compute_units=" << info.max_compute_units << ", gpu_eu_count=" << info.gpu_eu_count << ", device_arch=" << info.device_arch - << ", has_bf16_conversion=" << info.has_bf16_conversion + << ", has_bfloat16_conversions=" << info.has_bfloat16_conversions << ", has_subgroup_matrix_multiply_accumulate=" << info.has_subgroup_matrix_multiply_accumulate << ", has_subgroup_matrix_multiply_accumulate_tensor_float32="