Skip to content

Commit faa573c

Browse files
committed
x64: brgemm kernels: fix fp8 post-ops check
1 parent d89f95e commit faa573c

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ struct jit_brgemm_amx_uker_base_t : public jit_generator {
5252
for (int i = 0; i < post_ops.len(); i++) {
5353
const auto &entry = post_ops.entry_[i];
5454
if (!entry.is_binary()) continue;
55-
has_f8_e5m2_binary_postops = entry.binary.src1_desc.data_type
56-
== data_type::f8_e5m2;
57-
has_f8_e4m3_binary_postops = entry.binary.src1_desc.data_type
58-
== data_type::f8_e4m3;
55+
has_f8_e5m2_binary_postops
56+
= entry.binary.src1_desc.data_type == data_type::f8_e5m2
57+
|| has_f8_e5m2_binary_postops;
58+
has_f8_e4m3_binary_postops
59+
= entry.binary.src1_desc.data_type == data_type::f8_e4m3
60+
|| has_f8_e4m3_binary_postops;
5961
}
6062
}
6163

src/cpu/x64/brgemm/jit_brgemm_kernel.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ struct jit_brgemm_kernel_t : public jit_generator {
6464
for (int i = 0; i < post_ops.len(); i++) {
6565
const auto &entry = post_ops.entry_[i];
6666
if (!entry.is_binary()) continue;
67-
has_f8_e5m2_binary_postops = entry.binary.src1_desc.data_type
68-
== data_type::f8_e5m2;
69-
has_f8_e4m3_binary_postops = entry.binary.src1_desc.data_type
70-
== data_type::f8_e4m3;
67+
has_f8_e5m2_binary_postops
68+
= entry.binary.src1_desc.data_type == data_type::f8_e5m2
69+
|| has_f8_e5m2_binary_postops;
70+
has_f8_e4m3_binary_postops
71+
= entry.binary.src1_desc.data_type == data_type::f8_e4m3
72+
|| has_f8_e4m3_binary_postops;
7173
}
7274
}
7375

0 commit comments

Comments
 (0)