diff options
author | Antonio Sanchez <cantonios@google.com> | 2023-02-06 09:21:13 -0800 |
---|---|---|
committer | TensorFlow Release Automation <jenkins@tensorflow.org> | 2023-02-28 19:43:51 +0000 |
commit | e8ef38d3aee6289455b425656148c336946b932f (patch) | |
tree | 0f8bdf83dc524667fa2c42b48e4ddf789c6ffbc4 | |
parent | be650bd3754296c07a1c963dd030af49b454c3c8 (diff) | |
download | tensorflow-upstream-r2.12-478ea54bcf3.tar.gz |
Replace assert with eigen_assert.upstream-r2.12-478ea54bcf3
The plain assert macro can lead to ODR violations when used in headers. Fixes #59563.
PiperOrigin-RevId: 507500117
-rw-r--r-- | tensorflow/tsl/framework/fixedpoint/MatMatProductAVX2.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tensorflow/tsl/framework/fixedpoint/MatMatProductAVX2.h b/tensorflow/tsl/framework/fixedpoint/MatMatProductAVX2.h index ebb97f47f6c..74266676697 100644 --- a/tensorflow/tsl/framework/fixedpoint/MatMatProductAVX2.h +++ b/tensorflow/tsl/framework/fixedpoint/MatMatProductAVX2.h @@ -173,9 +173,9 @@ gemm_pack_lhs<QInt16, Index, DataMapper, Pack1, Pack2, QInt16, ColMajor, // Use alternate function for weird sizes if (rows % 16 != 0 || depth % 16 != 0) { - assert(false && - "only depths and rows that are a multiple of 16 are currently " - "supported"); + eigen_assert(false && + "only depths and rows that are a multiple of 16 are currently " + "supported"); // gemm_pack_lhs_any<QInt16, Index, DataMapper, Pack1, Pack2, ColMajor, // Conjugate, PanelMode> lhs_pack; // return lhs_pack(blockA, lhs, depth, rows, stride, offset); @@ -259,9 +259,9 @@ gemm_pack_rhs<QInt16, Index, DataMapper, nr, ColMajor, Conjugate, // Use alternate function for weird sizes if (cols % 16 != 0 || depth % 16 != 0) { - assert(false && - "only depths and cols that are a multiple of 16 are currently " - "supported"); + eigen_assert(false && + "only depths and cols that are a multiple of 16 are currently " + "supported"); // gemm_pack_rhs_any<QInt16, Index, DataMapper, nr, ColMajor, Conjugate, // PanelMode> rhs_pack; // return rhs_pack(blockB, rhs, depth, cols, stride, offset); @@ -360,9 +360,10 @@ gebp_kernel<QInt16, QInt16, Index, DataMapper, mr, nr, ConjugateLhs, // Use alternate function for weird sizes if (rows % 16 != 0 || cols % 16 != 0 || depth % 16 != 0) { - assert(false && - "only depths, cols and rows that are a multiple of 16 are currently " - "supported"); + eigen_assert( + false && + "only depths, cols and rows that are a multiple of 16 are currently " + "supported"); // gebp_kernel_any<QInt16, QInt16, Index, DataMapper, mr, nr, ConjugateLhs, // ConjugateRhs> gebp; // return gebp(res, blockA, blockB, rows, depth, cols, alpha, strideA, |