Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_linear_transformation for ROCm #3099

Merged
merged 1 commit into from Dec 3, 2020

Conversation

ashishfarmer
Copy link
Contributor

@ashishfarmer ashishfarmer commented Dec 2, 2020

For test_linear_transformation in test_transforms_tensor.py running on ROCm for batched tensors uses a BLAS config which does not give EXACT same output every time, which is why this test would result in a failure on ROCm. rocBLAS in pyTorch could be made to use deterministic algorithms by the setting torch.set_deterministic(True) implemented in PyTorch PR#48654
This PR adds that setting in the test.
@fmassa - Would you suggest using torch.set_deterministic(True) setting only for ROCm, and leave it as is for other platforms? In which case I can protect that using a conditional statement

cc: @jeffdaily @sunway513

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks!

It's fine to leave deterministic to all backends. This is btw something we should do more often in the tests.

cc @datumbox

@fmassa fmassa merged commit e2e323c into pytorch:master Dec 3, 2020
vfdev-5 pushed a commit to Quansight/vision that referenced this pull request Dec 4, 2020
facebook-github-bot pushed a commit that referenced this pull request Dec 8, 2020
Reviewed By: datumbox

Differential Revision: D25371946

fbshipit-source-id: cbf748a1e82638f936a21d12bcfea91b4779c9a5
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.

None yet

3 participants