Add relu.cpp example in test/neura/for_loop#127
Add relu.cpp example in test/neura/for_loop#127zsjiang99 wants to merge 2 commits intocoredac:mainfrom
Conversation
| output[i] += 0; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Provide a mlir test for this c++, plz refer to https://github.com/coredac/dataflow/blob/main/test/neura/for_loop/test.mlir
There was a problem hiding this comment.
Hi, cheng. I’ve modified other parts of relu.cpp, but I’ll need a bit more time to provide the MLIR test.
There was a problem hiding this comment.
Sure, take your time.
The corresponding mlir test has no mlir IRs there, it is just a bunch of commands to transform your provided C++ to our neura dialect.
There was a problem hiding this comment.
Do you mean that we only need to provide the RUN part, but not the CHECK part?
There was a problem hiding this comment.
CHECK part is also necessary, but they are just what generated by the corresponding command. For example,
// RUN: mlir-neura-opt %t-kernel.mlir\
// RUN: --assign-accelerator \
// RUN: --lower-llvm-to-neura \
// RUN: --canonicalize-live-in \
// RUN: --leverage-predicated-value \
// RUN: | FileCheck %s
the FileCheck %s is for making sure the code/IR after CHECK and CHECK-NEXT are generated from above commands.
// RUN: | FileCheck %s --check-prefix=CHECK-FUSED is for making sure the code/IR after CHECK-FUSED and CHECK-FUSED-NEXT are generated from following commands:
// RUN: mlir-neura-opt %t-kernel.mlir\
// RUN: --assign-accelerator \
// RUN: --lower-llvm-to-neura \
// RUN: --canonicalize-live-in \
// RUN: --leverage-predicated-value \
// RUN: --transform-ctrl-to-data-flow \
// RUN: --fold-constant \
// RUN: --fuse-pattern \
// RUN: | FileCheck %s --check-prefix=CHECK-FUSED
There was a problem hiding this comment.
Ok, I see. I will try to make a mlir test for relu.cpp.
|
We can close this PR as the test is already there? @ShangkunLi @zsjiang99? |
This test has already been added in |
Write a relu.cpp file in this path.