Created
June 6, 2024 17:01
-
-
Save pashu123/ceaa9a82405c441d57d88c99ecdbf401 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
func.func @pad_and_pack_static(%input: tensor<13x15xf32>, %output: tensor<2x8x8x2xf32>, %pad: f32) -> tensor<2x8x8x2xf32> { | |
%0 = tensor.pack %input padding_value(%pad : f32) inner_dims_pos = [0, 1] inner_tiles = [8, 2] into %output : tensor<13x15xf32> -> tensor<2x8x8x2xf32> | |
return %0 : tensor<2x8x8x2xf32> | |
} | |
module attributes {transform.with_named_sequence} { | |
transform.named_sequence @__transform_main(%arg1: !transform.any_op {transform.readonly}) { | |
%0 = transform.structured.match ops{["tensor.pack"]} in %arg1 : (!transform.any_op) -> !transform.any_op | |
%1, %loops:2 = transform.structured.tile_using_for %0 tile_sizes [2, 4] : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) | |
transform.yield | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment