Feature request: global "Fast Math" flag

未關閉
#262 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@koreaygj 已經在處理了。

開始於 2025年12月1日。

  • #331 來自 @koreaygj —— 未關閉

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
rust
領域
tooling

研究方向

首先定位 CudaBuilder 現有的全域 ftz 選項,並檢視 fadd_fast 及類似 intrinsic 的公開方式。將該行為與 NVCC 的 --use_fast_math 語意進行比較;完成的標準是確定是否可以新增全域 fast_math 選項,同時不改變現有針對嚴格 IEEE 數學的 opt-in 行為。

由索引模型根據 Issue 內容生成。

描述

enhancement

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

主要語言
Rust
星號
5.4k
分支
254
PR 合併指標
30 天內沒有已合併 PR

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Rust-GPU/rust-cuda 的其他 Issue

查看 Rust-GPU/rust-cuda 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。