Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMD] Fix clang warnings in AMD backend. #4031

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct DotOpMFMAConversionHelper {
}

int getNumSubmatrices(Type elementType, int mDim, int nDim) const {
if (mDim == 64 && nDim == 4 || mDim == 4 && nDim == 64)
if ((mDim == 64 && nDim == 4) || (mDim == 4 && nDim == 64))
return 1;
assert(mDim == nDim);
switch (mDim) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ struct FpToFpOpConversion
if (srcMap.count(key) == 0) {
return mlir::failure();
}
return mlir::FailureOr(srcMap.lookup(key));
return srcMap.lookup(key);
}

SmallVector<Value> createDestOps(triton::FpToFpOp op, OpAdaptor adaptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ struct LoadStoreConversionBase {
}

protected:
ModuleAxisInfoAnalysis &axisAnalysisPass;
const AMD::TargetInfo &targetInfo;
ModuleAxisInfoAnalysis &axisAnalysisPass;
};

struct LoadOpConversion : public ConvertOpToLLVMPattern<triton::LoadOp>,
Expand Down
2 changes: 1 addition & 1 deletion third_party/amd/lib/TritonAMDGPUToLLVM/TargetInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "TargetInfo.h"
#include "TritonAMDGPUToLLVM/GCNAsmFormat.h"
#include "Utility.h"
#include "amd/include/TritonAMDGPUToLLVM/GCNAsmFormat.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "triton/Conversion/TritonGPUToLLVM/Utility.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class BlockedToMFMA : public mlir::RewritePattern {
// in mfma 4x4 case argument matrix groups in 16 groups
if (mDim == 4 && nDim == 4)
kWidth = kDim / 16;
if (mDim == 4 && nDim == 64 || mDim == 64 && nDim == 4)
if ((mDim == 4 && nDim == 64) || (mDim == 64 && nDim == 4))
kWidth = kDim;

// We want to extend kWidth by kPack (kPack=1 means no extension)
Expand Down
Loading