Created
March 18, 2024 16:52
-
-
Save cathyzhyi/fba26778e310a5001ee705786c49af26 to your computer and use it in GitHub Desktop.
This file contains 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 @pad_mega_lib_3d_i32(%arg0: tensor<?x?x?xi32>, %arg1: index, %arg2: index, %arg3: index, %arg4: index, %arg5: index, %arg6: index, %arg7: i32) -> tensor<?x?x?xi32> { | |
%padded = tensor.pad %arg0 low[%arg4, %arg5, %arg6] high[%arg1, %arg2, %arg3] { | |
^bb0(%arg8: index, %arg9: index, %arg10: index): | |
tensor.yield %arg7 : i32 | |
} : tensor<?x?x?xi32> to tensor<?x?x?xi32> | |
return %padded : tensor<?x?x?xi32> | |
} | |
func.func @pad_mega_lib_2d_f32(%arg0: tensor<?x?xf32>, %arg1: index, %arg2: index, %arg3: index, %arg4: index, %arg5: f32) -> tensor<?x?xf32> { | |
%padded = tensor.pad %arg0 low[%arg3, %arg4] high[%arg1, %arg2] { | |
^bb0(%arg6: index, %arg7: index): | |
tensor.yield %arg5 : f32 | |
} : tensor<?x?xf32> to tensor<?x?xf32> | |
return %padded : tensor<?x?xf32> | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment