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

[FRONTEND] Add an environment variable to control TF32 default #3290

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

ThomasRaoux
Copy link
Collaborator

Add an environment variable that allows us to use ieee f32 by default. This makes it simpler to check for precision problems.

Add an environment variable that allows us to use ieee f32 by default.
This makes it simpler to check for precision problems.
@ThomasRaoux ThomasRaoux requested a review from ptillet as a code owner March 6, 2024 06:20
@ThomasRaoux ThomasRaoux requested a review from jlebar March 6, 2024 06:21
@@ -1404,6 +1405,11 @@ def dot(input, other, acc=None, allow_tf32=True, max_num_imprecise_acc=None, out
:param other: The second tensor to be multiplied.
:type other: 2D tensor of scalar-type in {:code:`float16`, :code:`bfloat16`, :code:`float32`}
"""
if allow_tf32 is None:
if os.getenv("TRITON_F32_DEFAULT", "0") == "1":
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit, in C++ we have a helper that accepts a variety of values meaning "true", we should probably accept the same values here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done, matched the C++ function

@ThomasRaoux ThomasRaoux requested a review from jlebar March 6, 2024 17:41
@ThomasRaoux ThomasRaoux merged commit dd8c270 into triton-lang:main Mar 6, 2024
4 checks passed
htyu pushed a commit to htyu/triton that referenced this pull request Mar 20, 2024
…n-lang#3290)

Add an environment variable that allows us to use ieee f32 by default.
This makes it simpler to check for precision problems.
binarman pushed a commit to binarman/triton that referenced this pull request Apr 2, 2024
…n-lang#3290)

Add an environment variable that allows us to use ieee f32 by default.
This makes it simpler to check for precision problems.
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