[Mlir-commits] [mlir] [TosaToTensor] Fix a warning (PR #86703)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 26 10:26:46 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
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]
---
Full diff: https://github.com/llvm/llvm-project/pull/86703.diff
1 Files Affected:
- (modified) mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp (+1-1)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/86703
More information about the Mlir-commits
mailing list