Skip to content

Feature request: global "Fast Math" flag #262

@niklebedenko

Description

@niklebedenko

With NVCC, I can use the flag --use_fast_math to enable algebraic optimisations globally when compiling a file. The only way I found to enable such optimisations in Rust-CUDA is to use the fadd_fast intrinsics (and similar). The typical reasoning for using this approach instead of a global "fast math" flag is that some math functions may rely on strict adherence to IEEE float semantics, so using a global "fast math" flag might silently break these. However, CudaBuilder already has a global ftz flag which may already break such functions. Therefore, perhaps it makes sense to also add a global fast_math flag, given that it's ok to globally opt-in to breaking IEEE anyway via ftz?

I'm happy to help with the implementation of this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions