Loading FastTransforms.jl can make FFTs via FFTW.jl 100x slower due to threading conflicts
评估
这个 Issue 还没有评估数据。
描述
While this is not a self-contained example, I would like to summarize an issue I had so that others may find it (and my workaround) when they search for it.
Loading FastTransforms.jl (import FastTransforms or using FastTransforms or loading a package depending on FastTransforms.jl) made some FFTs (of small real vectors with 256 to 4096 entries) via FFTW.jl roughly 100x slower on my system (when running Julia with one thread). Debugging this via the profiling tools showed that a huge amount of time was spent in __psynch_cvwait and __psynch_cvsignal. The reason appears to be
Reversing these settings by executing
FastTransforms.ft_set_num_threads(1)
ccall((:ft_fftw_init_threads, FastTransforms.libfasttransforms), Cint, ())
FastTransforms.ft_fftw_plan_with_nthreads(1)
after loading FastTransforms fixed the performance issue.
- 主要语言
- Julia
- 星标
- 282
- 派生
- 28
- 平均合并
- 9 小时 21 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaApproximation/FastTransforms.jl 的其他 Issue
-
难度 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 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
查看 JuliaApproximation/FastTransforms.jl 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 83/100
JuliaMath/Polynomials.jl#647 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
OpenSourceAWE/SymbolicAWEModels.jl#431 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 1/5 1 小时以内 新手友好度 89/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复