Initial benchmark command #207
Draft
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.
This is a work in progress PR to add a new benchmark command to the kernels cli tool. The idea is to enable a standard way to benchmark kernels
uvx \ --from git+https://github.com/huggingface/kernels.git@initial-benchmark-command \ --with torch \ --with numpy \ kernels benchmark kernels-community/activation # <- the expected command once mergedoutput
Updated https://github.com/huggingface/kernels.git (daa75e4edfaccca487b9de9fb2b85b4cd052fd42) Built kernels @ git+https://github.com/huggingface/kernels.git@daa75e4edfaccca487b9de9fb2b85b4cd052fd42 Installed 45 packages in 81ms Downloading kernels-community/activation@main... Running benchmark.py... ┌────────────────┬──────────┬────────────┬────────────┬────────────┬────────────┬────────────┬──────────┬───────────┐ │ Benchmark │ Workload │ Mean(ms) │ Std(ms) │ Min(ms) │ Max(ms) │ IQR(ms) │ Outliers │ Ref Match │ ├────────────────┼──────────┼────────────┼────────────┼────────────┼────────────┼────────────┼──────────┼───────────┤ │ SiluWorkloads │ medium │ 0.0109 │ 0.0003 │ 0.0105 │ 0.0130 │ 0.0002 │ 3 │ ✓ │ │ SiluWorkloads │ small │ 0.0051 │ 0.0005 │ 0.0049 │ 0.0095 │ 0.0002 │ 3 │ ✓ │ │ SiluWorkloads2 │ medium │ 0.0298 │ 0.0017 │ 0.0282 │ 0.0390 │ 0.0010 │ 5 │ · │ │ SiluWorkloads2 │ small │ 0.0061 │ 0.0025 │ 0.0055 │ 0.0305 │ 0.0001 │ 7 │ ✓ │ └────────────────┴──────────┴────────────┴────────────┴────────────┴────────────┴────────────┴──────────┴───────────┘ Dry run - use --upload to submit resultsbenchmark file