Skip to content

New tests feature + benchmarks#62

Merged
tdehoff merged 9 commits intomainfrom
tatiana-bench
Mar 4, 2026
Merged

New tests feature + benchmarks#62
tdehoff merged 9 commits intomainfrom
tatiana-bench

Conversation

@tdehoff
Copy link
Owner

@tdehoff tdehoff commented Mar 3, 2026

  1. Selected tests to run can be specified with argv. Example:
(MojoBLAS) tdehoff@hudson:~/MojoBLAS$ mojo test-level1.mojo dot asum iamax
--- MojoBLAS Level 1 routines testing ---

Running 3 tests for /home/tdehoff/MojoBLAS/test-level1.mojo 
    PASS [ 781.155 ] test_dot
    PASS [ 3.285 ] test_asum
    PASS [ 3.285 ] test_iamax
--------
Summary [ 787.726 ] 3 tests run: 3 passed , 0 failed , 0 skipped 
  1. Benchmarks take argvs too: can specify DType, problem size, num iterations. I used BLAS++ tests as a reference. Example:
(MojoBLAS) tdehoff@hudson:~/MojoBLAS$ mojo bench-level1.mojo --type float32 --n 10000
op, device, dtype, n, iters, avg time, bandwidth
copy, NVIDIA H100 NVL , float32 , 10000 , 100 , 7375 ns, 10.846486958455243 GB/s

To accommodate the updates, I had to change the generate_random_arr signature.
Feel free to suggest any improvements in what and how we print, as well as more argv-controlled parameters. I'll add benchmarks for the remaining routines once I receive some feedback.

Copy link
Collaborator

@jacksonmowry jacksonmowry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Thank you so much

Copy link
Collaborator

@acandershock acandershock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! the huge if else statement in test-level1.mojo reminded me of gregor's class, lol

@tdehoff tdehoff merged commit ba6c35e into main Mar 4, 2026
1 of 2 checks passed
@tdehoff tdehoff deleted the tatiana-bench branch March 4, 2026 18:33
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.

3 participants