Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Loading FastTransforms.jl can make FFTs via FFTW.jl 100x slower due to threading conflicts

未关闭
#267 0 条评论 2 个 reaction 已指派 2 人 在 GitHub 查看

@dlfivefifty 已经在做这个了。

开始于 2026年7月10日。

  • #270 来自 @copilot-swe-agent —— 未关闭

评估

这个 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

https://github.com/JuliaApproximation/FastTransforms.jl/blob/14a311816ffb58131ee09d7d6bf3cc50793dfc6a/src/libfasttransforms.jl#L15-L20

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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaApproximation/FastTransforms.jl 的其他 Issue

查看 JuliaApproximation/FastTransforms.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。