Skip to content

Ensure deterministic tests can run#3469

Closed
pcuenca wants to merge 1 commit intomainfrom
tests-cublas-workspace
Closed

Ensure deterministic tests can run#3469
pcuenca wants to merge 1 commit intomainfrom
tests-cublas-workspace

Conversation

@pcuenca
Copy link
Copy Markdown
Member

@pcuenca pcuenca commented May 17, 2023

I only added it to one of the files to validate it first. If this is what we want we can add it to the rest. Did you have another idea in mind @patrickvonplaten @sayakpaul?

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

logger = logging.get_logger(__name__)
torch.backends.cuda.matmul.allow_tf32 = False
torch.use_deterministic_algorithms(True)
os.environ["CUBLAS_WORKSPACE_CONFIG"] = os.environ.get("CUBLAS_WORKSPACE_CONFIG", ":16:8")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works for me!

@patrickvonplaten
Copy link
Copy Markdown
Contributor

Think this is not needed anymore since #3485 is merged

@pcuenca
Copy link
Copy Markdown
Member Author

pcuenca commented May 23, 2023

Yeah, thanks for refactoring this @patrickvonplaten!

@pcuenca pcuenca closed this May 23, 2023
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.

4 participants