sph methods slow?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- julia
- 領域
- performance
調査の方向性
issue に記載された比較対象の FFTW と、plan_sph2fourier、plan_sph_synthesis、lmul! を使って、報告された実行時間を再現します。まず、これらの球面変換のエントリポイントを見つけ、大きな配列と小さな配列の両方のケースをプロファイリングします。報告された低速化またはアロケーションを特定して対処できれば完了となりますが、issue では具体的な目標やテストは定義されていません。
索引モデルが issue の本文から書いたものです。
説明
Maybe this is totally expected, but:
- A lot slower than FFT. It has been a while, but I seem to recall (going back to 2018) that the first version was much more comparable to FFT
- Allocations that don't go away with in-place (hard to make an efficient time evolution algorithm in this case)
- Which method is the bottleneck depends on size
using FastTransforms
using FFTW
using LinearAlgebra
n,m = 1024,2047
x = randn(ComplexF64,n,m)
# FFTW
@time fft(x);
0.033259 seconds (259 allocations: 32.001 MiB)
P! = plan_fft!(x);
@time P!*x;
0.035154 seconds (232 allocations: 14.969 KiB)
# Spherical
P = plan_sph2fourier(x)
PS = plan_sph_synthesis(x)
@time PS*(P*x);
0.235185 seconds (549 allocations: 127.972 MiB, 1.57% gc time)
@time P*x; # slow
0.145820 seconds (8 allocations: 63.969 MiB, 1.85% gc time)
@time PS*x;
0.051036 seconds (545 allocations: 64.003 MiB)
@time lmul!(P,x); # slow
0.139856 seconds (4 allocations: 31.984 MiB, 0.91% gc time)
@time lmul!(PS,x);
0.047418 seconds (539 allocations: 32.018 MiB)
## small array
n,m = 60,121
x = randn(ComplexF64,n,m);
# FFTW
@time fft(x);
0.000560 seconds (242 allocations: 129.836 KiB)
P! = plan_fft!(x);
@time P!*x;
0.000411 seconds (218 allocations: 14.492 KiB)
# Spherical
P = plan_sph2fourier(x);
PS = plan_sph_synthesis(x);
@time PS*(P*x);
0.101827 seconds (19.31 k allocations: 1.626 MiB)
@time P*x;
0.000266 seconds (8 allocations: 227.406 KiB)
@time PS*x; # slow
0.031964 seconds (20.48 k allocations: 1.440 MiB)
@time lmul!(P,x);
0.000364 seconds (4 allocations: 113.594 KiB)
@time lmul!(PS,x); # slow
0.037324 seconds (20.38 k allocations: 1.326 MiB)
- 主要言語
- Julia
- スター
- 282
- フォーク
- 27
- 平均マージ
- 53分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaApproximation/FastTransforms.jl のほかの issue
-
Loading FastTransforms.jl can make FFTs via FFTW.jl 100x slower due to threading conflicts対応中かも @dlfivefifty が 90 日前に担当しました。 オープン
JuliaApproximation/FastTransforms.jl#267 · リアクション 2 件 · 担当者 2 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
JuliaApproximation/FastTransforms.jl#266 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
JuliaApproximation/FastTransforms.jl#263 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
JuliaApproximation/FastTransforms.jl#257 · コメント 1 件 ·
-
Allocating lmul!オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
JuliaApproximation/FastTransforms.jl#253 · コメント 7 件 ·
JuliaApproximation/FastTransforms.jl の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oxfordcontrol/COSMO.jl#211 ·
-
documentation
難易度 2/5 半日 初心者へのやさしさ 65/100
メンテナーはふだん 6 日以内に返信
-
Out-of-place JLArray/GPU problem with VectorContinuousCallback scalar-indexes (callback cache built with CPU zeros)対応中かも @ChrisRackauckas-Claude が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
SciML/OrdinaryDiffEq.jl#4813 ·
メンテナーはふだん 1 日以内に返信
-
ARKODE: callbacks that modify `u` throw MethodError on reinit対応中かも @devmotion が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
SciML/Sundials.jl#575 ·