Specialization of `N0f16` -> `Float16` conversion
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The issue links to the N0f8 to Float16 conversion in src/normed.jl around lines 145–147. Read that implementation and compare its behavior with the N0f16 conversion; reproduce the two reported mismatches, then determine what conversion change would make the results match the BigFloat reference. Done means those cases convert to the expected Float16 values.
索引モデルが issue の本文から書いたものです。
説明
I have long suggested considering the use of Float16 or BFloat16 for image processing tasks where there is a risk of overflow.
I personally believe that, as a result of the increasing use of GPUs in the Julia ecosystem, we find ourselves in the ironic situation where GPU support in the graphics field has lagged behind.
Even if there are counterarguments regarding my understanding of the situation, I don't think there's any problem with improving the conversion to Float16.
The current N0f8->Float16 conversion is performed via Float32, which isn't too bad.
https://github.com/JuliaMath/FixedPointNumbers.jl/blob/d62abf3a5f2f0e99e63e22eeb4835eff717c9086/src/normed.jl#L145-L147
julia> for i in 0x00:0xff
f = Float16(i/big"255")
n = Float16(reinterpret(N0f8, i))
f === n && continue
@show i, f, n
end
On the other hand, converting from N0f16 to Float16 results in an error of 1ULP (0.5ULP).
julia> for i in 0x0000:0xffff
f = Float16(i/big"65535")
n = Float16(reinterpret(N0f16, i))
f === n && continue
@show i, f, n
end
(i, f, n) = (0xffaf, Float16(0.9985), Float16(0.999))
(i, f, n) = (0xffef, Float16(0.9995), Float16(1.0))
- 主要言語
- Julia
- スター
- 95
- フォーク
- 38
- 平均マージ
- 14時間 24分
- マージ済み PR(30日)
- 17
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaMath/FixedPointNumbers.jl のほかの issue
-
enhancement needs comments
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
JuliaMath/FixedPointNumbers.jl#353 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
JuliaMath/FixedPointNumbers.jl#343 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Fallback of `floattype()` for non-concrete types対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
JuliaMath/FixedPointNumbers.jl#342 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaMath/FixedPointNumbers.jl#337 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
JuliaMath/FixedPointNumbers.jl#331 · コメント 10 件 ·
メンテナーはふだん 1 日以内に返信
JuliaMath/FixedPointNumbers.jl の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
io
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
docs
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaGPU/GPUArrays.jl#837 ·
メンテナーはふだん 1 日以内に返信