sph methods slow?
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- julia
- 领域
- performance
调研方向
使用 plan_sph2fourier、plan_sph_synthesis、lmul! 以及 issue 中与 FFTW 的比较来复现报告的耗时。首先定位这些球面变换入口,并对大数组和小数组两种情况进行性能分析。完成的标准是识别并处理报告的性能下降或内存分配问题,但 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 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 个 reaction · 已指派 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 于 1 天前认领。 未关闭
难度 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 ·