Skip to content

Commit ea01c72

Browse files
committed
Fix duplicate symbol getGenOpMix<ONNXRoundOp>
`getGenOpMix<ONNXRoundOp>` is used in src/Conversion/ONNXToKrnl/Quantization/QuantizeLinear.cpp. There, it can only see the generic definition of the template in `src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.hpp`. But there is also a explicit specialization in src/Conversion/ONNXToKrnl/Math/Elementwise.cpp. To ensure that the explicit specialization is used instead of instantiating the generic template, forward declare the explicit specialization.
1 parent b654c07 commit ea01c72

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Conversion/ONNXToKrnl/ONNXToKrnlCommon.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ GenOpMix getGenOpMix(mlir::Type elementType, mlir::Operation *op) {
268268
return {{GenericOps::ScalarOnlyGop, 1}};
269269
}
270270

271+
template <>
272+
GenOpMix getGenOpMix<mlir::ONNXRoundOp>(
273+
mlir::Type elementType, mlir::Operation *op);
274+
271275
//===----------------------------------------------------------------------===//
272276
// Type conversion from Onnx types to Krnl types:
273277
// - from Tensor type to the Standard dialect MemRef type

0 commit comments

Comments
 (0)