Skip to content

Commit

Permalink
Add the missing lit test fo relu (onnx#2467)
Browse files Browse the repository at this point in the history
Signed-off-by: Tung D. Le <[email protected]>
  • Loading branch information
tungld authored Aug 31, 2023
1 parent 8919cf3 commit 6add2ea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/mlir/accelerators/nnpa/conversion/zhigh-to-onnx/relu.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// RUN: onnx-mlir-opt --maccel=NNPA --convert-zhigh-to-onnx %s -split-input-file | FileCheck %s

func.func @test_log() -> tensor<10x10xf32> {
%cst0 = onnx.Constant dense<1.0> : tensor<10x10xf32>
%0 = "zhigh.Stick"(%cst0) {layout = "2D"} : (tensor<10x10xf32>) -> tensor<10x10xf32, #zhigh.layout<{dataLayout = "2D"}>>
%1 = "zhigh.Relu"(%0) : (tensor<10x10xf32, #zhigh.layout<{dataLayout = "2D"}>>) -> tensor<10x10xf32, #zhigh.layout<{dataLayout = "2D"}>>
%2 = "zhigh.Unstick"(%1) : (tensor<10x10xf32, #zhigh.layout<{dataLayout = "2D"}>>) -> tensor<10x10xf32>
return %2 : tensor<10x10xf32>

// CHECK-LABEL: func.func @test_log
// CHECK-SAME: () -> tensor<10x10xf32> {
// CHECK: [[VAR_0_:%.+]] = onnx.Constant dense<1.000000e+00> : tensor<10x10xf32>
// CHECK: [[VAR_1_:%.+]] = "onnx.Relu"([[VAR_0_]]) : (tensor<10x10xf32>) -> tensor<10x10xf32>
// CHECK: return [[VAR_1_]] : tensor<10x10xf32>
// CHECK: }
}

0 comments on commit 6add2ea

Please sign in to comment.