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

Compile test fix #6104

Merged
merged 3 commits into from
Dec 15, 2023
Merged

Compile test fix #6104

merged 3 commits into from
Dec 15, 2023

Conversation

DN6
Copy link
Collaborator

@DN6 DN6 commented Dec 8, 2023

What does this PR do?

Running into a strange error when Pytest is collecting the tests with the new device agonistic tests checks

Running

 RUN_SLOW=yes python -m pytest -s -v tests/

Will lead to the following error

ERROR tests/pipelines/text_to_video_synthesis/test_video_to_video.py - ValueError: You have passed a device of type 'cuda' which should work with 'fp16', but 'cuda' does not seem to be correctly installed on your machine: Deterministic behavior was enabled with either `torch.use_deterministic_algorithms(True)` or `at::Context::setDeterministicAlgorithms(true)`, but this operation is not deterministic because it uses CuBLAS and you have CUDA >= 10.2. To enable deterministic behavior in this case, you must set an environment variable before running your PyTorch application: CUBLAS_WORKSPACE_CONFIG=:4096:8 or CUBLAS_WORKSPACE_CONFIG=:16:8. For more information, go to 

Because two of of the checks use a nondeterministic op (@) to veritfy whether fp16/fp64 is supported.

But running any test that throws this error directly works fine

 RUN_SLOW=yes python -m pytest -s -v tests/<path to test>

Changing the check to use a deterministic operation to fix this. Although I'm not 100% sure why the collection step fails.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6 DN6 requested a review from patrickvonplaten December 8, 2023 12:36
@DN6
Copy link
Collaborator Author

DN6 commented Dec 12, 2023

@patrickvonplaten Gentle ping

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Nice!

@DN6 DN6 merged commit d704a73 into main Dec 15, 2023
16 checks passed
donhardman pushed a commit to donhardman/diffusers that referenced this pull request Dec 18, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants