Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle ftz flag correctly #289

Open
vosen opened this issue Oct 14, 2024 · 0 comments · May be fixed by #342
Open

Handle ftz flag correctly #289

vosen opened this issue Oct 14, 2024 · 0 comments · May be fixed by #342
Assignees
Labels
help wanted Extra attention is needed

Comments

@vosen
Copy link
Owner

vosen commented Oct 14, 2024

Expected outcome:
All instructions with .ftz modifiers correctly flush subnormals (or not, if the flag is unset). Even in the modules with mixed ftz-on/ftz-off instructions.

Comments:

  • Most of the time a module will either have all instructions ftz-on or all instructions ftz-off. Implementation should make use of that fact and visit all instructions if we are in such case. Consult with with LLVM, I think AMDGPU LLVM supports ftz attribute function-wide
  • If it's mixed ftz mode then best course of action is to set ftz off and flush per-argument. ptx_parser and its visitors (visit/visit_mut/visit_map) should be extended to report ftz information. Changes to generate_instruction_type! will also be necessary to expose per-argument ftz information.
  • llvm.canonicalize can probably do the flushing, needs checking
@vosen vosen added the help wanted Extra attention is needed label Oct 14, 2024
@vosen vosen self-assigned this Feb 19, 2025
@vosen vosen linked a pull request Feb 22, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant