You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/06/27 19:00:52 UTC

[GitHub] [tvm] shingjan opened a new pull request, #11922: [PyTorch] [Relay] Add aten::pad

shingjan opened a new pull request, #11922:
URL: https://github.com/apache/tvm/pull/11922

   This PR intends to add `aten::pad` in the pytorch frontend and refactor the padding-related ops. 
   
   
   cc: @masahi Seems to me that only with this change `test_forward_functional_pad` was able to work on my local end, is this test disabled before on CI? This is also the reason why I am not adding a new test case. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] masahi merged pull request #11922: [PyTorch] [Relay] Add aten::pad

Posted by GitBox <gi...@apache.org>.
masahi merged PR #11922:
URL: https://github.com/apache/tvm/pull/11922


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] masahi commented on a diff in pull request #11922: [PyTorch] [Relay] Add aten::pad

Posted by GitBox <gi...@apache.org>.
masahi commented on code in PR #11922:
URL: https://github.com/apache/tvm/pull/11922#discussion_r907733361


##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -3142,12 +3178,13 @@ def create_convert_map(self):
             "prim::NumToTensor": self.numtotensor,
             "prim::ImplicitTensorToNum": self.tensortonum,
             "aten::ScalarImplicit": self.tensortonum,
-            "aten::constant_pad_nd": self.make_pad("constant"),
-            "aten::reflection_pad1d": self.make_pad("reflect"),
-            "aten::reflection_pad2d": self.make_pad("reflect"),
-            "aten::replication_pad1d": self.make_pad("edge"),
-            "aten::replication_pad2d": self.make_pad("edge"),
-            "aten::replication_pad3d": self.make_pad("edge"),
+            "aten::pad": self.pad,

Review Comment:
   They should be tested. There are tests like `test_forward_constant_pad1d` and `test_forward_reflection_pad1d()` in `pytorch/test_forward.py`.
   
   Can you test on PT 1.10? This is the version we use on CI. From our earlier conversation, I'm guessing that `aten::pad` is not in PT 1.10, so we cannot test his on CI.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] shingjan commented on a diff in pull request #11922: [PyTorch] [Relay] Add aten::pad

Posted by GitBox <gi...@apache.org>.
shingjan commented on code in PR #11922:
URL: https://github.com/apache/tvm/pull/11922#discussion_r907706887


##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -3142,12 +3178,13 @@ def create_convert_map(self):
             "prim::NumToTensor": self.numtotensor,
             "prim::ImplicitTensorToNum": self.tensortonum,
             "aten::ScalarImplicit": self.tensortonum,
-            "aten::constant_pad_nd": self.make_pad("constant"),
-            "aten::reflection_pad1d": self.make_pad("reflect"),
-            "aten::reflection_pad2d": self.make_pad("reflect"),
-            "aten::replication_pad1d": self.make_pad("edge"),
-            "aten::replication_pad2d": self.make_pad("edge"),
-            "aten::replication_pad3d": self.make_pad("edge"),
+            "aten::pad": self.pad,

Review Comment:
   Seems to me that only with this change `test_forward_functional_pad` was able to work on my local end, is this test disabled before on CI? This is also the reason why I am not adding a new test case. @masahi 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org