[BACKEND] Minor fixes found when building triton with LLVM 17/main branches (#2089)

- These minor fixes are not specific to interface changes from LLVM main
or official llvm-17 branch and can be applied on triton main branch.
- https://github.com/darkbuck/triton/tree/darkbuck/main/llvm-main-branch
has extra changes to build again LLVM main branch build to enable me to
work on other backends on the main branch only. That's the hobby effort
and just FYR.
This commit is contained in:
darkbuck
2023-08-15 21:18:06 -04:00
committed by GitHub
parent 129e7dfc6f
commit a3df6068b4
4 changed files with 9 additions and 3 deletions

View File

@@ -24,7 +24,9 @@
#include <algorithm>
#include <cstdlib>
#include <set>
#include <string>
namespace triton {
const std::set<std::string> ENV_VARS = {

View File

@@ -1460,9 +1460,10 @@ struct TritonGPUInferLayoutInterface
return success();
}
LogicalResult inferDotOpEncoding(Attribute operandEncoding, unsigned opIdx,
Attribute retEncoding,
Optional<Location> location) const override {
LogicalResult
inferDotOpEncoding(Attribute operandEncoding, unsigned opIdx,
Attribute retEncoding,
std::optional<Location> location) const override {
auto mmaRetEncoding = retEncoding.dyn_cast<MmaEncodingAttr>();
if (mmaRetEncoding && mmaRetEncoding.isHopper()) {
// TODO: support gmma when A/B does not reside in shared memory

View File

@@ -30,6 +30,8 @@
#include "triton/Dialect/TritonNvidiaGPU/IR/Dialect.h"
#include "triton/Dialect/TritonNvidiaGPU/Transforms/Utility.h"
#include <set>
using namespace mlir;
namespace ttg = triton::gpu;
namespace ttng = triton::nvidia_gpu;

View File

@@ -335,6 +335,7 @@ setup(
"matplotlib",
"pandas",
"tabulate",
"torch",
],
},
)