Skip to content

restore generic IndexToScatterGatherOffset specialization - #40349

Closed
ngimel wants to merge 2 commits into
pytorch:masterfrom
ngimel:indexing_template
Closed

ngimel wants to merge 2 commits into
pytorch:masterfrom
ngimel:indexing_template

Conversation

@ngimel

@ngimel ngimel commented Jun 20, 2020

Copy link
Copy Markdown
Collaborator

#39963 erroneously removed template specialization to compute offsets, causing cases relying on this specialization (topk for 4d+ tensors with topk dimension >= 1024/2048 depending on the type) to produce bogus results.

@dr-ci

dr-ci Bot commented Jun 20, 2020 •

Copy link
Copy Markdown

💊 CI failures summary and remediations

As of commit c577769 (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 5 times.

@mruberry
mruberry self-requested a review June 21, 2020 04:26

@mruberry mruberry left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Stamped.

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@ngimel merged this pull request in 3bbedb3.

@ezyang

ezyang commented Jun 22, 2020

Copy link
Copy Markdown
Contributor

Whoops, thanks for the catch. CC @kurtamohler

@ngimel

ngimel commented Jun 22, 2020

Copy link
Copy Markdown
Collaborator Author

@kurtamohler you can get rid of THC gather if you wrap a TH tensor using THTensor_wrap and call ATen gather on the wrapped tensor. Then the remaining kernel can be removed from THC.

@kurtamohler

Copy link
Copy Markdown
Collaborator

Darn, sorry about that. I shouldn't have assumed that an existing test would fail if that template was actually needed.

@ngimel

ngimel commented Jun 22, 2020

Copy link
Copy Markdown
Collaborator Author

np, it is failing under very specific conditions and unfortunately we did not have a test to catch that. It could have gone unnoticed for a long time, but another PR exposed this bug.

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.

5 participants