Skip to content

[Test Cases][BugFix] Add some version check to make test cases run in all PyTorch versions#14903

Merged
masahi merged 2 commits intoapache:mainfrom
jikechao:fix_test_cases
May 23, 2023
Merged

[Test Cases][BugFix] Add some version check to make test cases run in all PyTorch versions#14903
masahi merged 2 commits intoapache:mainfrom
jikechao:fix_test_cases

Conversation

@jikechao
Copy link
Copy Markdown
Member

@jikechao jikechao commented May 22, 2023

This PR added some version checks to avoid calling the operator/attribute, which has not been introduced yet!

When the PyTorch <=1.7.1, test cases will fail.

FAILED frontend/pytorch/test_forward.py::test_forward_tensor_split - AttributeError: module 'torch' has no attribute 'tensor_split'
FAILED frontend/pytorch/test_forward.py::test_grid_sample - ValueError: nn.functional.grid_sample(): expected mode to be 'bilinear' or 'nearest', but got: 'bicubic'

cc @echuraev @Hzfengsy @shingjan

Add some version check to avoid calling the operator/attribute which has not been introduced yet!
@tvm-bot
Copy link
Copy Markdown
Collaborator

tvm-bot commented May 22, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: test cases, bugfix See #10317 for details

Generated by tvm-bot

@github-actions github-actions Bot requested review from Hzfengsy and echuraev May 22, 2023 05:21
@jikechao jikechao changed the title [Test Cases][BugFix] Add some version check to make test cases run in all PyTorch versions. [Test Cases][BugFix] Add some version check to make test cases run in all PyTorch versions May 22, 2023
@jikechao
Copy link
Copy Markdown
Member Author

@tvm-bot rerun

Copy link
Copy Markdown
Contributor

@echuraev echuraev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jikechao
Copy link
Copy Markdown
Member Author

@tvm-bot rerun

@masahi masahi merged commit dddc339 into apache:main May 23, 2023
mei-ye pushed a commit to mei-ye/tvm that referenced this pull request Jun 1, 2023
… all PyTorch versions (apache#14903)

* fix test cases

Add some version check to avoid calling the operator/attribute which has not been introduced yet!

* Update test_forward.py
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

Successfully merging this pull request may close these issues.

4 participants