Skip to content

Conversation

ailzhang
Copy link
Contributor

@ailzhang ailzhang commented Jul 29, 2020

resize_ only requires manual registration to Autograd key and its device kernels can safely live together with our normal device dispatch in native_functions.yaml.
But currently we do manual registration for CPU/CUDA kernels (and leaves no dispatch in native_functions.yaml) which makes resize_ non-overrideable from backend point of view. While it indeed should dispatch at device level, this caused xla to whitelist resize_ and register a lowering to XLA key. This PR moves the device dispatch of resize_ back to native_functions.yaml so that it shows up as abstract method properly for downstream extensions.
Note that we also do manual registration for copy_/detach_/resize_as_/etc in aten but they are slightly different than resize_ since for them we only register catchAll kernels instead of device kernels. I'll need to investigate and send a followup PR for those ops.

@dr-ci
Copy link

dr-ci bot commented Jul 29, 2020

💊 CI failures summary and remediations

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


💚 💚 Looks good so far! There are no failures yet. 💚 💚


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 7 times.

@ailzhang ailzhang requested review from bhosmer, ezyang and smessmer July 29, 2020 23:24
@ailzhang ailzhang changed the title test2 Make resize_ use normal device dispatch Jul 29, 2020
Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

oh happy day

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.

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

@facebook-github-bot
Copy link
Contributor

@ailzhang merged this pull request in 0adb584.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants