From 891c69a199c15935a4c48013d2757ceab27afee9 Mon Sep 17 00:00:00 2001 From: Dmitrii Zarukin Date: Thu, 28 Nov 2024 10:47:45 -0800 Subject: [PATCH] fixup: cpu: x64: brgemm: fix hidden operator== c++20 introduced new mechanics of comparison operators and now certain scenarios require both operator== and operator!= to be defined so that the operation would be equivalent for a X b and b X a. --- src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp b/src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp index 641a88d6a21..c463bc21adb 100644 --- a/src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp +++ b/src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp @@ -263,6 +263,9 @@ struct jit_brgemm_amx_uker_base_t : public jit_generator { virtual bool operator==(const dim_iteration_t &rhs) const { return blocks == rhs.blocks; } + virtual bool operator!=(const dim_iteration_t &rhs) const { + return !operator==(rhs); + } size_t pos(size_t b) const { assert(b < blocks.size()); @@ -318,6 +321,9 @@ struct jit_brgemm_amx_uker_base_t : public jit_generator { && zp_comp_pad_a_shift == rhs.zp_comp_pad_a_shift; return res; } + bool operator!=(const dim_iteration_t &_rhs) const override { + return !operator==(_rhs); + } }; struct bs_iteration_t {