mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Fix TensorPadding bug in squeezed reads from inner dimension
This commit is contained in:
parent
73e55525e5
commit
7a65219a2e
@ -364,9 +364,12 @@ struct TensorEvaluator<const TensorPaddingOp<PaddingDimensions, ArgType>, Device
|
||||
// When possible we squeeze writes for the innermost (only if non-padded)
|
||||
// dimension with the first padded dimension. This allows to reduce the
|
||||
// number of calls to LinCopy and better utilize vector instructions.
|
||||
const bool squeeze_writes = NumDims > 1 &&
|
||||
// inner dimension is not padded
|
||||
input_inner_dim_size == output_inner_dim_size;
|
||||
const bool squeeze_writes =
|
||||
NumDims > 1 &&
|
||||
// inner dimension is not padded
|
||||
(input_inner_dim_size == m_dimensions[inner_dim_idx]) &&
|
||||
// and equal to the block inner dimension
|
||||
(input_inner_dim_size == output_inner_dim_size);
|
||||
|
||||
const int squeeze_dim = IsColMajor ? inner_dim_idx + 1 : inner_dim_idx - 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user