Skip to content

Conversation

@jithunnair-amd
Copy link
Collaborator

PyTorch extensions can have .cpp or .h files which contain CUDA code that needs to be hipified. The current hipify script logic has overly strict conditions to determine which files get considered for hipification: https://github.com/pytorch/pytorch/blob/master/torch/utils/hipify/hipify_python.py#L146

These conditions might apply well to pytorch/caffe2 source code, but are overconstrained for third-party extensions.
is_pytorch_file conditions: https://github.com/pytorch/pytorch/blob/master/torch/utils/hipify/hipify_python.py#L549
is_caffe2_gpu_file conditions: https://github.com/pytorch/pytorch/blob/master/torch/utils/hipify/hipify_python.py#L561

This PR relaxes these conditions if we're hipifying a pytorch extension (specified by is_pytorch_extension=True) and considers all the file extensions specified using the extensions parameter: https://github.com/pytorch/pytorch/blob/master/torch/utils/hipify/hipify_python.py#L820

@dr-ci
Copy link

dr-ci bot commented Aug 24, 2020

💊 CI failures summary and remediations

As of commit 1f05579 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 3 times.

@ngimel
Copy link
Collaborator

ngimel commented Aug 25, 2020

@jeffdaily please let me know if it looks good to you and I'll land

@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 25, 2020
@jithunnair-amd
Copy link
Collaborator Author

@ashishfarmer Can you please review the changes in this PR?

@jithunnair-amd
Copy link
Collaborator Author

cc @lcskrishna

@ashishfarmer
Copy link

The changes look good. I am going to run a test with torchvision to see how this change impacts hipification there, and will comment back here

@ashishfarmer
Copy link

Torchvision builds well with the changes here.

@ngimel
Copy link
Collaborator

ngimel commented Aug 25, 2020

Is it ready for merge?

@jeffdaily
Copy link
Collaborator

Yes, thank you.

@ngimel ngimel marked this pull request as ready for review August 25, 2020 21:07
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ngimel has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ngimel merged this pull request in 28be3ef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants