Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify pad legality #35

Closed
jpienaar opened this issue Jun 9, 2022 · 3 comments
Closed

Clarify pad legality #35

jpienaar opened this issue Jun 9, 2022 · 3 comments
Assignees

Comments

@jpienaar
Copy link
Member

jpienaar commented Jun 9, 2022

Is

func.func public @main(%arg0: tensor<2x3xi8> loc(unknown), %arg1: tensor<i8> loc(unknown)) -> tensor<2x1xi8> {
    %0 = "mhlo.pad"(%arg0, %arg1) {edge_padding_high = dense<[0, -1]> : tensor<2xi64>, edge_padding_low = dense<[0, -1]> : tensor<2xi64>, interior_padding = dense<0> : tensor<2xi64>} : (tensor<2x3xi8>, tensor<i8>) -> tensor<2x1xi8> loc(#loc1)
    return %0 : tensor<2x1xi8> loc(#loc0)
  }

legal pad?

Came up in iree-org/iree#9296

@burmako burmako assigned sdasgup3 and unassigned burmako Jun 13, 2022
@sdasgup3
Copy link
Collaborator

@jpienaar
I am assuming that we are talking about the negative value of the padding. From MHLO's perpective, that seems legal: the absolute value indicates the number of elements to remove from the specified dimension.

@jpienaar
Copy link
Member Author

Could you document it on the op?

@sdasgup3
Copy link
Collaborator

Sorry that is not documented. Sure, I will do that.

copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this issue Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants