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

Handle ftz flag correctly #289

Open
vosen opened this issue Oct 14, 2024 · 0 comments
Open

Handle ftz flag correctly #289

vosen opened this issue Oct 14, 2024 · 0 comments
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant