-
Notifications
You must be signed in to change notification settings - Fork 56
fix cuda ut bug of use_deterministic_algorithms #805
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
Conversation
for more information, see https://pre-commit.ci
…ound into hengguo/fix_ut_0909
for more information, see https://pre-commit.ci
logger.warning(f"unrecognized keys {list(kwargs.keys())} were passed. Please check them.") | ||
|
||
if not disable_deterministic_algorithms: | ||
# deprecated, default not to use torch.use_deterministic_algorithms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upper case
) | ||
if "CUBLAS_WORKSPACE_CONFIG" not in os.environ: | ||
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8" | ||
torch.use_deterministic_algorithms(True, warn_only=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if enable_deterministic_algorithms is not set, we use warn_only=Ture, which is the default behavior in our previous version, though I admit it's a quite confusing.
(cherry picked from commit 886d657)
No description provided.