Skip to content

Commit

Permalink
Update bfloat16 conversion propert
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
  • Loading branch information
anmyachev committed Aug 20, 2024
1 parent eaa07b1 commit 78ff2fb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion csrc/gpu/aten/core/DeviceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct DeviceInfo {
uint32_t max_num_sub_groups;
std::vector<size_t> 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;
Expand Down
4 changes: 2 additions & 2 deletions csrc/gpu/runtime/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion csrc/gpu/runtime/DeviceProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions intel_extension_for_pytorch/csrc/xpu/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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="
Expand Down

0 comments on commit 78ff2fb

Please sign in to comment.