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

[REQUEST] Expose compilation option to disable/enable fmad instructions #379

Open
nvlukasz opened this issue Dec 5, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@nvlukasz
Copy link
Contributor

nvlukasz commented Dec 5, 2024

Description

Allow controlling whether compilers emit fused floating point instructions like fmad, since these instructions can affect numerical accuracy.

Context

We observed surprising floating point precision issues in Autodesk XLB and traced it down to fmad instructions. These can be disabled with the --fmad=false option to NVRTC.

@nvlukasz nvlukasz added the enhancement New feature or request label Dec 5, 2024
@nvlukasz nvlukasz self-assigned this Dec 5, 2024
@nvlukasz
Copy link
Contributor Author

nvlukasz commented Dec 5, 2024

The simplest way to add this would be to include a boolean enable_fmad option in module or kernel options. This would be similar to the existing fast_math option.

However, we could consider doing something more general, like allowing users to specify arbitrary compiler options for each backend. This would likely be more work, but might result in a simpler and more flexible system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant