Delay mag-phase conversion and wire atan benchmark#67
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
vec5cubic/vectorized phase path where possible to accelerate paired phase computation for both double and float.make benchmarksfor fairer comparisons.Description
forward_mag_phaseto first pack Bruun residues into standard complex bin order (filloutput[k].re/output[k].imfromwork) and then call a contiguous conversion helperconvert_standard_complex_to_mag_phase. (Seesrc/detail/bruun_kernel.hpp.)convert_standard_complex_to_mag_phaseandconvert_standard_complex_to_mag_phase_f32helpers that perform contiguous complex->(magnitude,phase) conversion and reuse thevec5cubic paired/vectorized phase path viabruun_phase_atan2_mag_pairfor paired lanes whereBRUUN_LEVEL >= 1.forward_mag_phase_f32to pack residues in 4-wide batches usingpack4_residues_to_complex_f32when possible, then call the contiguousconvert_standard_complex_to_mag_phase_f32helper.examples/atan2_benchmark.cppto introducetime_vec5_pair_loopwhich benchmarks the pairedvec5path, replaced the previous single-sample vec5 timing with the paired/vectorized timing for doubles, and clarified printed labels.Makefileby adding anATAN2_BENCHtarget and including it in thebenchmarkstarget so it builds withmake benchmarks.Testing
make test benchmarkswhich built the library and benchmarks and executed unit probes;build/tests/correctnessprintedcorrectness okandbuild/tests/api_cprintedc api okindicating success.build/examples/atan2_benchmark(example run:build/examples/atan2_benchmark 1024), which produced timing output and exercised the paired/vectorizedvec5path; the run completed successfully.benchmarkstarget reported nothing outstanding to build after changes (makeoutput indicated benchmarks were up-to-date), and compilation of examples succeeded during the test runs.Codex Task