Skip to content
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

[SW] Fix FFT performance #22

Merged
merged 2 commits into from
Jan 11, 2025
Merged

[SW] Fix FFT performance #22

merged 2 commits into from
Jan 11, 2025

Conversation

mp-17
Copy link
Contributor

@mp-17 mp-17 commented Jan 6, 2025

HP:

  • There are #FPUs in total in the architecture
  • Each FPU can compute 1 DP-FMACC per cycle or 1 DP-FLOP per cycle for every other operation
  • 1 DP-FMACC == 2 DP-FLOP in terms of number of operations
64-bit FFT
#samples: `NFFT`
operations: 5 * NFFT * log2(NFFT) [DP-FLOP]
performance: operations / runtime [DP-FLOP/cycle]
max_performance: 5/4 * #FPUs [DP-FLOP/cycle]
utilization: 100 * performance / max_performance [%]

Notes:
To calculate the utilization using integer numbers, avoiding precision loss, we replace the 5/4 term with 1250/1000:

1250/1000 = 1.25 = 5/4

@mp-17 mp-17 self-assigned this Jan 6, 2025
@mp-17 mp-17 requested a review from DiyouS January 6, 2025 16:02
@DiyouS
Copy link
Collaborator

DiyouS commented Jan 6, 2025

Can we also add the reason we need to multiply with 5/4 as a comment into the utilization calculation? I feel it would be helpful for anyone who wants to understand the code.

@mp-17
Copy link
Contributor Author

mp-17 commented Jan 6, 2025

Thanks, done!

@mp-17
Copy link
Contributor Author

mp-17 commented Jan 11, 2025

I can compile it locally, so it seems okay. But we need to fix the CI

@mp-17 mp-17 merged commit 7059213 into main Jan 11, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants