Reverts back to MLIR 14 & updates CMakeLists
This commit is contained in:
3
lib/CMakeLists.txt
Normal file
3
lib/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
# add_subdirectory(codegen)
|
||||
add_subdirectory(driver)
|
||||
add_subdirectory(ir)
|
5
lib/codegen/CMakeLists.txt
Normal file
5
lib/codegen/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
file(GLOB_RECURSE CODEGEN_SRC *.cc)
|
||||
|
||||
add_library(TritonCodeGen
|
||||
${CODEGEN_SRC}
|
||||
)
|
5
lib/driver/CMakeLists.txt
Normal file
5
lib/driver/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
add_library(TritonDriver
|
||||
dispatch.cc
|
||||
error.cc
|
||||
llvm.cc
|
||||
)
|
@@ -1,12 +1,34 @@
|
||||
add_mlir_dialect_library(TRITONIR
|
||||
add_mlir_dialect_library(TritonIR
|
||||
Dialect.cpp
|
||||
Ops.cpp
|
||||
Types.cpp
|
||||
|
||||
DEPENDS
|
||||
TritonTableGen
|
||||
|
||||
LINK_LIBS PUBLIC
|
||||
MLIRIR
|
||||
MLIRArithmetic
|
||||
MLIRControlFlow
|
||||
MLIRFunc
|
||||
|
||||
# Since LLVM 15
|
||||
# MLIRControlFlow
|
||||
# MLIRFunc
|
||||
# else
|
||||
MLIRStandard
|
||||
|
||||
MLIRTensor
|
||||
)
|
||||
|
||||
# add_library(TritonIR
|
||||
# Dialect.cpp
|
||||
# Ops.cpp
|
||||
# Types.cpp
|
||||
# )
|
||||
|
||||
# target_link_libraries(TritonIR PUBLIC
|
||||
# MLIRIR
|
||||
# MLIRArithmetic
|
||||
# MLIRControlFlow
|
||||
# MLIRFunc
|
||||
# MLIRTensor
|
||||
# )
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "triton/Dialect.h"
|
||||
#include "triton/Types.h"
|
||||
#include "triton/ir/Dialect.h"
|
||||
#include "triton/ir/Types.h"
|
||||
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "mlir/IR/DialectImplementation.h"
|
||||
|
||||
|
||||
#include "triton/Dialect.cpp.inc"
|
||||
#include "triton/ir/Dialect.cpp.inc"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace mlir::triton;
|
||||
@@ -18,7 +18,7 @@ void TritonDialect::initialize() {
|
||||
|
||||
addOperations<
|
||||
#define GET_OP_LIST
|
||||
#include "triton/Ops.cpp.inc"
|
||||
#include "triton/ir/Ops.cpp.inc"
|
||||
>();
|
||||
|
||||
// We can also add interface here.
|
||||
|
@@ -1,15 +1,16 @@
|
||||
#include "triton/ir/Dialect.h"
|
||||
#include "triton/ir/Types.h"
|
||||
|
||||
#include "mlir/IR/Builders.h"
|
||||
#include "mlir/IR/BuiltinAttributes.h"
|
||||
#include "mlir/IR/BuiltinTypes.h"
|
||||
#include "mlir/IR/OperationSupport.h"
|
||||
#include "triton/Dialect.h"
|
||||
#include "triton/Types.h"
|
||||
|
||||
#define GET_OP_CLASSES
|
||||
#include "triton/Ops.cpp.inc"
|
||||
#include "triton/ir/Ops.cpp.inc"
|
||||
|
||||
// enum attribute definitions
|
||||
#include "triton/OpsEnums.cpp.inc"
|
||||
#include "triton/ir/OpsEnums.cpp.inc"
|
||||
|
||||
namespace mlir {
|
||||
namespace triton {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "triton/Dialect.h"
|
||||
#include "triton/Types.h"
|
||||
#include "triton/ir/Dialect.h"
|
||||
#include "triton/ir/Types.h"
|
||||
|
||||
using namespace mlir;
|
||||
using namespace mlir::triton;
|
||||
|
Reference in New Issue
Block a user