一键导入
fix-batched-fft-axis0
ins.fft(arr, n, axis=0) on 2D complex128 GPU arrays produces wrong results — use numpy FFT or axis=1 workaround
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
ins.fft(arr, n, axis=0) on 2D complex128 GPU arrays produces wrong results — use numpy FFT or axis=1 workaround
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add device information query functions through HAL → ins:: API → language bindings
Add --device all/--timer/--info CLI flags to demos across all languages for competition scoring
Add composite signal operators using existing primitives (no dedicated backend kernels needed)
How to port a cusignal Python/CUDA module to ins::signal C++ using Insight7 primitives and HAL
Profile and optimize binding language (Lua/Julia/Python) demo performance to match or exceed C++ baseline
busted loads _insight.so from ~/.luarocks/lib first, not build/ — must copy .so after rebuild
| name | fix-batched-fft-axis0 |
| description | ins.fft(arr, n, axis=0) on 2D complex128 GPU arrays produces wrong results — use numpy FFT or axis=1 workaround |
| source | auto-skill |
| extracted_at | 2026-06-06T19:58:07.524Z |
ins.fft(pc * window_2d, N_PULSES, axis=0) 对 2D complex128 数组沿 axis=0 做批量 FFT 时,结果全集中在 DC(0Hz)。
对比 numpy 的 1D FFT 结果:
# Insight7 FFT (有 bug)
spec = ins.fft(data, n, 0) # ❌ 全在 0Hz
# NumPy FFT (正确)
spec_np = np.fft.fft(data.numpy(), n, axis=0) # ✅ 正确位置
pc_np = pc_ac.numpy()
win_2d = np.reshape(window.numpy(), [N_PULSES, 1])
spec_np = np.fft.fft(pc_np * win_2d, N_PULSES, axis=0) / float(N_PULSES)
spec_np = np.fft.fftshift(spec_np, axes=0)
doppler_shifted = ins.from_numpy(spec_np)
pc_t = ins.permute(pc, [1, 0]) # (N, N_PULSES)
window_2d = ins.reshape(window, [1, N_PULSES])
spec_t = ins.fft(pc_t * window_2d, N_PULSES, 1) / float(N_PULSES)
spec = ins.permute(spec_t, [1, 0])
spec = ins.fftshift(spec, 0)
n_cols = int(pc.shape()[1])
result = ins.zeros([N_PULSES, n_cols], ins.complex128)
for c in range(n_cols):
col = pc[:, c] # 或使用字符串索引
result[:, c] = ins.fft(col * window, N_PULSES, 0)
ins.fft 沿 axis=1(最后一个维度)工作正常ins.fft(1d_array, n, 0) 工作正常ins.fft2d 未测试