Putting Triton dialect in its own folder
This commit is contained in:
@@ -1 +1 @@
|
|||||||
add_subdirectory(triton/ir)
|
add_subdirectory(triton/Dialect)
|
||||||
|
1
include/triton/Dialect/CMakeLists.txt
Normal file
1
include/triton/Dialect/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(Triton)
|
@@ -1,7 +1,6 @@
|
|||||||
#ifndef TRITON_IR_DIALECT_H_
|
#ifndef TRITON_IR_DIALECT_H_
|
||||||
#define TRITON_IR_DIALECT_H_
|
#define TRITON_IR_DIALECT_H_
|
||||||
|
|
||||||
#include "triton/ir/Traits.h"
|
|
||||||
|
|
||||||
#include "mlir/IR/BuiltinOps.h"
|
#include "mlir/IR/BuiltinOps.h"
|
||||||
#include "mlir/IR/Dialect.h"
|
#include "mlir/IR/Dialect.h"
|
||||||
@@ -9,11 +8,11 @@
|
|||||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||||
#include "mlir/Dialect/SCF/SCF.h"
|
#include "mlir/Dialect/SCF/SCF.h"
|
||||||
|
|
||||||
#include "triton/ir/Dialect.h.inc"
|
#include "triton/Dialect/Triton/Traits.h"
|
||||||
|
#include "triton/Dialect/Triton/Dialect.h.inc"
|
||||||
#include "triton/ir/OpsEnums.h.inc"
|
#include "triton/Dialect/Triton/OpsEnums.h.inc"
|
||||||
|
|
||||||
#define GET_OP_CLASSES
|
#define GET_OP_CLASSES
|
||||||
#include "triton/ir/Ops.h.inc"
|
#include "triton/Dialect/Triton/Ops.h.inc"
|
||||||
|
|
||||||
#endif // TRITON_IR_DIALECT_H_
|
#endif // TRITON_IR_DIALECT_H_
|
@@ -5,6 +5,6 @@
|
|||||||
#include "mlir/IR/Types.h"
|
#include "mlir/IR/Types.h"
|
||||||
|
|
||||||
#define GET_TYPEDEF_CLASSES
|
#define GET_TYPEDEF_CLASSES
|
||||||
#include "triton/ir/Types.h.inc"
|
#include "triton/Dialect/Triton/Types.h.inc"
|
||||||
|
|
||||||
#endif // TRITON_IR_TYPES_H_
|
#endif // TRITON_IR_TYPES_H_
|
@@ -1,3 +1,3 @@
|
|||||||
# add_subdirectory(codegen)
|
# add_subdirectory(codegen)
|
||||||
add_subdirectory(driver)
|
add_subdirectory(driver)
|
||||||
add_subdirectory(ir)
|
add_subdirectory(Dialect)
|
||||||
|
1
lib/Dialect/CMakeLists.txt
Normal file
1
lib/Dialect/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
add_subdirectory(Triton)
|
@@ -1,5 +1,5 @@
|
|||||||
#include "triton/ir/Dialect.h"
|
#include "triton/Dialect/Triton/Dialect.h"
|
||||||
#include "triton/ir/Types.h"
|
#include "triton/Dialect/Triton/Types.h"
|
||||||
|
|
||||||
#include "llvm/ADT/StringSwitch.h"
|
#include "llvm/ADT/StringSwitch.h"
|
||||||
#include "llvm/ADT/TypeSwitch.h"
|
#include "llvm/ADT/TypeSwitch.h"
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "mlir/IR/DialectImplementation.h"
|
#include "mlir/IR/DialectImplementation.h"
|
||||||
|
|
||||||
|
|
||||||
#include "triton/ir/Dialect.cpp.inc"
|
#include "triton/Dialect/Triton/Dialect.cpp.inc"
|
||||||
|
|
||||||
using namespace mlir;
|
using namespace mlir;
|
||||||
using namespace mlir::triton;
|
using namespace mlir::triton;
|
||||||
@@ -18,7 +18,7 @@ void TritonDialect::initialize() {
|
|||||||
|
|
||||||
addOperations<
|
addOperations<
|
||||||
#define GET_OP_LIST
|
#define GET_OP_LIST
|
||||||
#include "triton/ir/Ops.cpp.inc"
|
#include "triton/Dialect/Triton/Ops.cpp.inc"
|
||||||
>();
|
>();
|
||||||
|
|
||||||
// We can also add interface here.
|
// We can also add interface here.
|
@@ -1,5 +1,5 @@
|
|||||||
#include "triton/ir/Dialect.h"
|
#include "triton/Dialect/Triton/Dialect.h"
|
||||||
#include "triton/ir/Types.h"
|
#include "triton/Dialect/Triton/Types.h"
|
||||||
|
|
||||||
#include "mlir/IR/Builders.h"
|
#include "mlir/IR/Builders.h"
|
||||||
#include "mlir/IR/BuiltinAttributes.h"
|
#include "mlir/IR/BuiltinAttributes.h"
|
||||||
@@ -38,10 +38,10 @@ static Type getPointerTypeFromTensor(Type type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define GET_OP_CLASSES
|
#define GET_OP_CLASSES
|
||||||
#include "triton/ir/Ops.cpp.inc"
|
#include "triton/Dialect/Triton/Ops.cpp.inc"
|
||||||
|
|
||||||
// enum attribute definitions
|
// enum attribute definitions
|
||||||
#include "triton/ir/OpsEnums.cpp.inc"
|
#include "triton/Dialect/Triton/OpsEnums.cpp.inc"
|
||||||
|
|
||||||
namespace mlir {
|
namespace mlir {
|
||||||
namespace triton {
|
namespace triton {
|
@@ -1,5 +1,5 @@
|
|||||||
#include "triton/ir/Dialect.h"
|
#include "triton/Dialect/Triton/Dialect.h"
|
||||||
#include "triton/ir/Types.h"
|
#include "triton/Dialect/Triton/Types.h"
|
||||||
#include "mlir/IR/DialectImplementation.h" // required by `Types.cpp.inc`
|
#include "mlir/IR/DialectImplementation.h" // required by `Types.cpp.inc`
|
||||||
#include "llvm/ADT/TypeSwitch.h" // required by `Types.cpp.inc`
|
#include "llvm/ADT/TypeSwitch.h" // required by `Types.cpp.inc`
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ using namespace mlir;
|
|||||||
using namespace mlir::triton;
|
using namespace mlir::triton;
|
||||||
|
|
||||||
#define GET_TYPEDEF_CLASSES
|
#define GET_TYPEDEF_CLASSES
|
||||||
#include "triton/ir/Types.cpp.inc"
|
#include "triton/Dialect/Triton/Types.cpp.inc"
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Triton Dialect
|
// Triton Dialect
|
||||||
@@ -15,7 +15,7 @@ using namespace mlir::triton;
|
|||||||
void TritonDialect::registerTypes() {
|
void TritonDialect::registerTypes() {
|
||||||
addTypes<
|
addTypes<
|
||||||
#define GET_TYPEDEF_LIST
|
#define GET_TYPEDEF_LIST
|
||||||
#include "triton/ir/Types.cpp.inc"
|
#include "triton/Dialect/Triton/Types.cpp.inc"
|
||||||
>();
|
>();
|
||||||
}
|
}
|
||||||
|
|
@@ -12,8 +12,8 @@
|
|||||||
#include "mlir/Transforms/Passes.h"
|
#include "mlir/Transforms/Passes.h"
|
||||||
|
|
||||||
|
|
||||||
#include "triton/ir/Dialect.h"
|
#include "triton/Dialect/Triton/Dialect.h"
|
||||||
#include "triton/ir/Types.h"
|
#include "triton/Dialect/Triton/Types.h"
|
||||||
|
|
||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
#include "llvm/IR/LegacyPassManager.h"
|
#include "llvm/IR/LegacyPassManager.h"
|
||||||
|
Reference in New Issue
Block a user