Skip to content

Commit

Permalink
#1190: Added runtime support for doing golden comparision for flatbuf…
Browse files Browse the repository at this point in the history
…fers in ttrt
  • Loading branch information
tapspatel committed Nov 11, 2024
1 parent b288494 commit 315788b
Show file tree
Hide file tree
Showing 14 changed files with 759 additions and 173 deletions.
21 changes: 21 additions & 0 deletions include/ttmlir/Target/TTNN/program.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ table GetDeviceOp {
mesh: Dim2d;
chip_ids: [uint32];
out: tt.target.DeviceRef;
debug_info: string;
}

table ToMemoryConfigOp {
in0: tt.target.TensorRef;
memcfg: MemoryConfigDesc;
out: tt.target.TensorRef;
debug_info: string;
}

table ToLayoutOp {
Expand All @@ -22,24 +24,28 @@ table ToLayoutOp {
memcfg: tt.target.MemoryConfigDesc;
device: tt.target.DeviceRef;
out: tt.target.TensorRef;
debug_info: string;
}

table TypecastOp {
in: tt.target.TensorRef;
dtype: tt.target.DataType;
out: tt.target.TensorRef;
debug_info: string;
}

table ToDeviceOp {
in: tt.target.TensorRef;
device: tt.target.DeviceRef;
memcfg: tt.target.MemoryConfigDesc;
out: tt.target.TensorRef;
debug_info: string;
}

table FromDeviceOp {
in: tt.target.TensorRef;
out: tt.target.TensorRef;
debug_info: string;
}

table EmptyOp {
Expand All @@ -51,6 +57,7 @@ table EmptyOp {
memcfg: tt.target.MemoryConfigDesc; // optional
strategy: tt.target.DistributionStrategy;
out: tt.target.TensorRef;
debug_info: string;
}

table FullOp {
Expand All @@ -59,6 +66,7 @@ table FullOp {
num_shards: uint32;
strategy: tt.target.DistributionStrategy;
out: tt.target.TensorRef;
debug_info: string;
}

enum EltwiseOpType: uint32 {
Expand Down Expand Up @@ -108,6 +116,7 @@ table EltwiseOp {
ins: [tt.target.TensorRef];
out: tt.target.TensorRef;
params: EltwiseOpParams;
debug_info: string;
}

enum ReductionOpType: uint32 {
Expand All @@ -122,37 +131,43 @@ table ReductionOp {
out: tt.target.TensorRef;
dim_arg: [int32];
keep_dim: bool;
debug_info: string;
}

table EmbeddingOp {
input: tt.target.TensorRef;
weight: tt.target.TensorRef;
out: tt.target.TensorRef;
debug_info: string;
}

table SoftmaxOp {
in: tt.target.TensorRef;
out: tt.target.TensorRef;
dimension: int32;
debug_info: string;
}

table TransposeOp {
in: tt.target.TensorRef;
out: tt.target.TensorRef;
dim0: int32;
dim1: int32;
debug_info: string;
}

table ConcatOp {
inputs: [tt.target.TensorRef];
out: tt.target.TensorRef;
dim: int32;
debug_info: string;
}

table ReshapeOp {
in: tt.target.TensorRef;
out: tt.target.TensorRef;
shape: [int32];
debug_info: string;
}

table SliceOp {
Expand All @@ -161,13 +176,15 @@ table SliceOp {
begins: [int64];
ends: [int64];
step: [int64];
debug_info: string;
}

// ANCHOR: adding_an_op_matmul_fbs
table MatmulOp {
in0: tt.target.TensorRef;
in1: tt.target.TensorRef;
out: tt.target.TensorRef;
debug_info: string;
}
// ANCHOR_END: adding_an_op_matmul_fbs

Expand All @@ -191,6 +208,7 @@ table Conv2dOp {
dilation_height: uint32;
dilation_width: uint32;
groups: uint32;
debug_info: string;
}

table MaxPool2dOp {
Expand All @@ -210,17 +228,20 @@ table MaxPool2dOp {
ceil_mode: bool;
padding_height: uint32;
padding_width: uint32;
debug_info: string;
}

table DeallocOp {
in: tt.target.TensorRef;
debug_info: string;
}

table AllGatherOp {
in: tt.target.TensorRef;
out: tt.target.TensorRef;
dim: uint32;
num_links: uint32;
debug_info: string;
}

union OpType {
Expand Down
Loading

0 comments on commit 315788b

Please sign in to comment.