[Mlir-commits] [mlir] 1eaef44 - [TosaToTensor] Fix a warning (#86703)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 26 10:33:22 PDT 2024
Author: Kazu Hirata
Date: 2024-03-26T10:33:17-07:00
New Revision: 1eaef44532266694c28f49f5c0373e7fc93d4f82
URL: https://github.com/llvm/llvm-project/commit/1eaef44532266694c28f49f5c0373e7fc93d4f82
DIFF: https://github.com/llvm/llvm-project/commit/1eaef44532266694c28f49f5c0373e7fc93d4f82.diff
LOG: [TosaToTensor] Fix a warning (#86703)
This patch fixes:
mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp:76:46: error:
'multiplies' may not intend to support class template argument
deduction [-Werror,-Wctad-maybe-unsupported]
Added:
Modified:
mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
index 11ba98ddf352b4..cd6da355824691 100644
--- a/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
+++ b/mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
@@ -73,7 +73,7 @@ TensorType inferReshapeExpandedType(TensorType inputType,
// Calculate the product of all elements in 'newShape' except for the -1
// placeholder, which we discard by negating the result.
int64_t totalSizeNoPlaceholder = -std::accumulate(
- newShape.begin(), newShape.end(), 1, std::multiplies());
+ newShape.begin(), newShape.end(), 1, std::multiplies<int64_t>());
// If there is a 0 component in 'newShape', resolve the placeholder as 0.
if (totalSizeNoPlaceholder == 0)
More information about the Mlir-commits
mailing list