Skip to content

[apps] Fix log algorithm bug, tighten FP result checks for several kernels, add check for FFT imaginary parts; [hw] Fix axi_cut parameter names for gate-level simulation - #554

Open
hopang-0221 wants to merge 2 commits into
mainfrom
hp/log_fix

Conversation

@hopang-0221

@hopang-0221 hopang-0221 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • log: missing x factor in the polynomial. __log_1xf64/__log_2xf32 computed y = P(x)·z instead of y = P(x)·x·z (z = x²), as in the Cephes logf / sse_mathfun log_ps reference. The fix adds the missing vfmul for both precisions.
  • Tighter result checks. cos, exp, log and fft used THRESHOLD 1, which hid the log bug. It is now 1e-4, as for softmax and the LLM kernels.
  • fft imaginary check. The "Img part" check compared the real parts again (samples_reim[i] vs samples_copy[i][0]). It now compares samples_reim[i + NFFT] with samples_copy[i][1].
  • CI. log is added to the simulate app list; it was not simulated before.
  • ara_soc: axi_cut parameter names under TARGET_GATESIM. i_system_cut overrode req_t/resp_t, which axi_cut (axi v0.39.5) names axi_req_t/axi_resp_t. RTL simulation and CI never build this instance.

Changelog

Fixed

  • Fix the missing x factor in the log kernel polynomial (FP64 and FP32)
  • Check the imaginary parts in the fft result check
  • Fix the axi_cut parameter names in ara_soc for gate-level simulation

Added

  • Simulate log in CI

Changed

  • Tighten the result-check threshold of cos, exp, log and fft from 1 to 1e-4

Checklist

  • Automated tests pass
  • Changelog updated
  • Code style guideline is observed

…rnels, add check for FFT imaginary parts; [hw] Fix axi_cut parameter names for gate-level simulation

This branch has not been deployed

No deployments
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.

1 participant