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

[backend][fp8] Float8E4M3FNUZ -> Float8E4M3FN for NVIDIA PTX #4596

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

chsigg
Copy link
Collaborator

@chsigg chsigg commented Aug 29, 2024

Fix MLIR type used for e4m3 fp8 type in NVIDIA PTX codegen.

#3681

Co-authored-by: acollins3 <acollins@nvidia.com>
@chsigg chsigg requested review from Jokeren and ptillet as code owners August 29, 2024 07:46
Copy link
Collaborator

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

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

LGTM

@Jokeren Jokeren merged commit 9665bc0 into triton-lang:main Aug 30, 2024
7 checks passed
@yiakwy-xpu-ml-framework-team

Hi @chsigg AMD uses Float8E4M3FNUZ (bias == 8) instead of Float8E4M3FN (bias == 7). Will it be a problem if we modifying codes directly over TritonIR ?

@chsigg chsigg deleted the fp8_fix branch September 10, 2024 09:06
@chsigg
Copy link
Collaborator Author

chsigg commented Sep 10, 2024

Hi @chsigg AMD uses Float8E4M3FNUZ (bias == 8) instead of Float8E4M3FN (bias == 7). Will it be a problem if we modifying codes directly over TritonIR ?

@acollins3 tried to keep this generic in openxla#8 (comment) where it's not backend-specific yet. I hope we manage for both fp8 types to coexist. I'm not sure what you mean by 'modifying codes directly over TritonIR'.

@yiakwy-xpu-ml-framework-team

Hi @chsigg AMD uses Float8E4M3FNUZ (bias == 8) instead of Float8E4M3FN (bias == 7). Will it be a problem if we modifying codes directly over TritonIR ?

@acollins3 tried to keep this generic in openxla#8 (comment) where it's not backend-specific yet. I hope we manage for both fp8 types to coexist. I'm not sure what you mean by 'modifying codes directly over overriding'.

Because I see we overiding existing fp8 without adding a new fp8 (I guess adding a new one) is more robust. Float8E4M3FN uses 0b1111 111 to represent NaNs, while Float8E4M3FNUZ uses 0b1000 000.

I am not sure this will be a problem. I share this information to relevant people to check against. Thank you for the fast response.

bertmaher pushed a commit to bertmaher/triton that referenced this pull request Dec 10, 2024
…lang#4596)

Fix MLIR type used for e4m3 fp8 type in NVIDIA PTX codegen.

triton-lang#3681

Co-authored-by: acollins3 <acollins@nvidia.com>
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