construct files structure

This commit is contained in:
hanchen8 2020-04-21 17:29:35 -05:00
parent 8149f1717b
commit dbe3466267
8 changed files with 57 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.vscode/

0
CMakeLists.txt Normal file
View File

0
fpgakrnl.cpp Normal file
View File

0
include/CMakeLists.txt Normal file
View File

View File

View File

@ -0,0 +1,18 @@
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Function.h"
#include "mlir/Interfaces/SideEffects.h"
namespace mlir {
namespace fpgakrnl {
class FpgaKrnlDialect : public mlir::Dialect {
explicit FpgaKrnlDialect(mlir::MLIRContext *ctx);
static llvm::StringRef getDialectNamespace() {
return "fpgakrnl";
}
};
#define GET_OP_CLASSES
#include "toy/Ops.h.inc"
}
}

38
include/fpgakrnl/Ops.td Normal file
View File

@ -0,0 +1,38 @@
include "mlir/IR/OpBase.td"
include "mlir/Interfaces/SideEffects.td"
def FpgaKrnl_Dialect : Dialect {
let name = "fpgakrnl";
let cppNamespace = "fpgakrnl";
}
class FpgaKrnl_Op<string mnemonic, list<OpTrait> traits = []> :
Op<FpgaKrnl_Dialect, mnemonic, traits>;
def ConvOp : FpgaKrnl_Op<"conv", [NoSideEffect]> {
let summary = "conv";
let description = [{
Convolution Operation.
}];
// hanchen is working here
let arguments = ();
let results = ();
}
def MaxPoolOp : FpgaKrnl_Op<"maxpool", [NoSideEffect]> {
let summary = "maxpool";
let description = [{
Max Pooling Operation.
}];
// hanchen is working here
let arguments = ();
let results = ();
}

0
mlir/Dialect.cpp Normal file
View File