Skip to content

Conversation

yuguo68
Copy link
Contributor

@yuguo68 yuguo68 commented Jun 1, 2021

Summary:
index_add can take int or long index tensor whereas index_put only takes long indices tensor.

In the deterministic path of index_add_cuda, we use index_put. Hence we better convert index tensor to long.

Test Plan:
buck test mode/opt //caffe2/test:torch_cuda -- test_index_add_deterministic

✓ ListingSuccess: caffe2/test:torch_cuda - main (14.748)
✓ Pass: caffe2/test:torch_cuda - test_index_add_deterministic_cuda (test_torch.TestTorchDeviceTypeCUDA) (27.717)
✓ Pass: caffe2/test:torch_cuda - main (27.717)

Differential Revision: D28804038

Summary:
index_add can take int or long index tensor whereas index_put only takes long indices tensor.

In the deterministic path of index_add_cuda, we use index_put. Hence we better convert index tensor to long.

Test Plan:
buck test mode/opt //caffe2/test:torch_cuda -- test_index_add_deterministic

    ✓ ListingSuccess: caffe2/test:torch_cuda - main (14.748)
    ✓ Pass: caffe2/test:torch_cuda - test_index_add_deterministic_cuda (test_torch.TestTorchDeviceTypeCUDA) (27.717)
    ✓ Pass: caffe2/test:torch_cuda - main (27.717)

Differential Revision: D28804038

fbshipit-source-id: a82e3e79b2cddd16c0d4be93a581ac59f1f4aa07
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 1, 2021

💊 CI failures summary and remediations

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


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

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 to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28804038

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8805093.

deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
)

Summary:
Pull Request resolved: pytorch#59254

index_add can take int or long index tensor whereas index_put only takes long indices tensor.

In the deterministic path of index_add_cuda, we use index_put. Hence we better convert index tensor to long.

Test Plan:
buck test mode/opt //caffe2/test:torch_cuda -- test_index_add_deterministic

    ✓ ListingSuccess: caffe2/test:torch_cuda - main (14.748)
    ✓ Pass: caffe2/test:torch_cuda - test_index_add_deterministic_cuda (test_torch.TestTorchDeviceTypeCUDA) (27.717)
    ✓ Pass: caffe2/test:torch_cuda - main (27.717)

Reviewed By: ngimel

Differential Revision: D28804038

fbshipit-source-id: de12932a7738f2805f3bceb3ec024497625bce6a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants