Add ASV benchmarks - #184
Open
vchamarthi wants to merge 2 commits into
Open
vchamarthi wants to merge 2 commits into
vchamarthi wants to merge 2 commits into
Conversation
Adds an asv suite under benchmarks/ following the mkl_fft and mkl_umath layout, so mkl_random can run in the shared ASV benchmark pipeline. Covers every distribution (with parameters chosen per oneMKL method branch), method= variants, all deterministic engines, randint per dtype and C path, shuffle/permutation/choice, multivariate and array-valued parameters, the numpy_random interface and patched numpy.random, and peak memory. Also adds a benchmark extra, ignores .asv/, and exempts benchmarks from D102 as for tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
vchamarthi
requested review from
antonwolfy,
jharlow-intel,
ndgrigorian,
vlad-perevezentsev and
xaleryb
as code owners
September 28, 2026 14:58
This branch has not been deployed
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.
Adds an ASV benchmark suite under
benchmarks/, following the layout of the mkl_fft and mkl_umath suites so mkl_random can run in the same benchmark pipeline.What it covers:
method=variants for gaussian, lognormal, multinormal_cholesky and poissonrandintfor every dtype and each C fill path, plus array-valued boundsshuffle,permutation,choicemkl_random.interfaces.numpy_randomandnumpy.randomunderpatch_numpy_random()Other changes:
benchmarkoptional dependency group inpyproject.toml.asv/added to.gitignorebenchmarks/, as for testsTested on a 2x Xeon 6980P with master built from source:
asv checkis clean, and a full run (81 benchmarks, 272 points) takes about 22 min with no failures. Two runs on identical code showed no difference above 1.2x (median ratio 0.999, worst 1.155x).Full-range
randintandbytes()are only benchmarked on generators that implementUniformBits32/64; on MCG31, MRG32K3A, R250 and WH they currently return uninitialized data.