[Mlir-commits] [mlir] c0f504d - [mlir] Fix two build warnings in VectorToGPU (NFC)
Jie Fu
llvmlistbot at llvm.org
Tue Feb 14 17:36:00 PST 2023
Author: Jie Fu
Date: 2023-02-15T09:35:49+08:00
New Revision: c0f504df485707e9852047671222076a7de035da
URL: https://github.com/llvm/llvm-project/commit/c0f504df485707e9852047671222076a7de035da
DIFF: https://github.com/llvm/llvm-project/commit/c0f504df485707e9852047671222076a7de035da.diff
LOG: [mlir] Fix two build warnings in VectorToGPU (NFC)
In file included from /data/llvm-project/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp:13:
/data/llvm-project/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h:15:1: error: class 'LogicalResult' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Werror,-Wmismatched-tags]
class LogicalResult;
^
/data/llvm-project/mlir/include/mlir/Support/LogicalResult.h:26:22: note: previous use is here
struct [[nodiscard]] LogicalResult {
^
/data/llvm-project/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h:15:1: note: did you mean struct here?
class LogicalResult;
^~~~~
struct
/data/llvm-project/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp:724:5: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
rewriter.notifyMatchFailure(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Added:
Modified:
mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
Removed:
################################################################################
diff --git a/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h b/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
index d8231fc5a10b5..3530eb5651e8f 100644
--- a/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
+++ b/mlir/include/mlir/Conversion/VectorToGPU/VectorToGPU.h
@@ -12,7 +12,7 @@
#include "mlir/IR/PatternMatch.h"
namespace mlir {
-class LogicalResult;
+struct LogicalResult;
class MLIRContext;
class Pass;
class RewritePatternSet;
diff --git a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
index 0266ba139ec7d..d8703597b281f 100644
--- a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
+++ b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
@@ -721,7 +721,7 @@ createNonLdMatrixLoads(RewriterBase &rewriter, vector::TransferReadOp op,
FailureOr<nvgpu::FragmentElementInfo> regInfo =
nvgpu::getMmaSyncRegisterType(*warpMatrixInfo);
if (failed(regInfo)) {
- rewriter.notifyMatchFailure(
+ return rewriter.notifyMatchFailure(
op, "Failed to deduce register fragment type during "
"conversion to distributed non-ldmatrix compatible load");
}
More information about the Mlir-commits
mailing list