-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature](mluOpExecFFT): add bluestein fft #1213
base: master
Are you sure you want to change the base?
Conversation
#### 3.1.2 任意长度bluestein fft实现 | ||
#### 3.1.2.1 1d bluestein fft | ||
根据算法计算步骤 1.2.1.3 可知, 核心逻辑为对输入数据乘系数后得到a[n],进行pad后再进行fft,结果与另一个系数的fft 结果相乘再逆fft,结果再乘系数。 | ||
其中关键步骤fft 及ifft 可直接调用前述fft 及ifft kernel 进行计算。需要实现的是1. x[n]*w[n], 复数矩阵每列乘以相应复数系数;2. fft(a_pad) * fft(h_pad), fft(h_pad)结果为1位复数向量, 其实质为也是一个复数矩每列阵乘以相应的复数系数;3. w[k]*ifft()也是计算复数矩阵每列乘以复数相应系数。这个三个计算步骤实质是相同的,所以实现完整的bluestein fft 算法除调用上述接口外还需要实现此功能, 命名接complex_coeff_matmul(),以及系数生成generate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.generate()系数占用空间多少,SRAM 肯定能放下吗?长度是 FFT 旋转因子的长度,还是全部的N?
2.所有核用的是相同的系数吧,然后是只有一个 ipu core 在 generate,还是每个核 generate 1/4,后面方式的性能应该更好些?
3.为什么不直接保存在 NRAM 上,是空间不够吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
计算中有三个需要系数的地方,都不一样,是想每次调用的时候计算,只需要调用一次,时间消耗应该不大,之前打算一个cluster 单ipu core 算完存在sram,sram 空间比较大 2M, 应该够N 用了,这里因为是拼接算子,所以暂时不涉及原来fft 所需要的旋转因子。明哥提醒每个core generate 1/4 更合适,之前没看到有这个 从非0 起的指令函数,刚找到了。
nram 上怕空间不够用,大点的N 就放不下了, 例如4098 pad 到比较8192 更大的数会比较大,所以放sram
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate那个如果N超了2M有存在GDRAM上的备用方案吗,客户规模不一定有,但补充功能测例时应该不保准不会测到吧
Thanks for your contribution and we appreciate it a lot. 🚀🚀
1. Motivation
Please describe your motivation and the goal you want to achieve through this pull request.
2. Modification
Please briefly describe what modification is made in this pull request, and indicate where to make the modification.
Are new test cases added? If so, please post the corresponding generator-PR link here.
3. Test Report
If you want to know how to do operator testing, you can see GTest-User-Guide-zh.
3.1 Modification Details
3.1.1 Accuracy Acceptance Standard
For static threshold standard details, see: MLU-OPS™ Accuracy Acceptance Standard.
3.1.2 Operator Scheme checklist
3.2 Accuracy Test
3.2.1 Accuracy Test
If you have checked the following items, please tick the relevant box.
3.2.2 Parameter Check
Test Point-1:
When a new operator is submitted, the test points are given and the test results are stated
. Acceptance Standard:Normal error
.Test Point-2:
Whether illegal parameters are passed
. Acceptance Standard:Normal error
.3.3 Performance Test
See MLU-OPS™ Performance Acceptance Standard for details.
Platform:MLU370
Platform:MLU590
3.4 Summary Analysis
Please give a brief overview here, if you want to note and summarize the content.