Created
September 30, 2024 13:52
-
-
Save pashu123/0b7aaf935976479e2ed2d4e2be51628d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module { | |
func.func @simple_test_with_cfg(%arg0: i8) -> tensor<2x4xf32> { | |
%0 = flow.dispatch.region -> (tensor<2x4xf32>) { | |
%c0_i8 = arith.constant 0 : i8 | |
%1 = arith.cmpi eq, %arg0, %c0_i8 : i8 | |
cf.cond_br %1, ^bb1, ^bb2 | |
^bb1: // pred: ^bb0 | |
%2 = tensor.empty() : tensor<2x4xf32> | |
flow.return %2 : tensor<2x4xf32> | |
^bb2: // pred: ^bb0 | |
%cst = arith.constant dense<1.000000e+00> : tensor<2x4xf32> | |
flow.return %cst : tensor<2x4xf32> | |
} | |
return %0 : tensor<2x4xf32> | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment