Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
450 commits
Select commit Hold shift + click to select a range
e01c2d5
added sww_ref_l4r5zi; currently pretty similar to sww_testing
jeremy-syn Feb 2, 2025
f3bfde3
changed I2S buffers to int16_t
jeremy-syn Feb 2, 2025
55fdb44
added readme to describe working of test project
jeremy-syn Feb 2, 2025
2e9f22d
streaming processing in progress
jeremy-syn Feb 3, 2025
c797356
added linker scripts, somehow left out of earlier commits
jeremy-syn Feb 6, 2025
f473c59
fixed some issues in streaming feature extraction (mostly pointer ari…
jeremy-syn Feb 7, 2025
95aebf3
sww_ref detects ww in streaming setup and pulses GPIO PB8, also chang…
jeremy-syn Feb 8, 2025
5c559f2
PowerBoard LPM
TimotheeeNiven Feb 10, 2025
9310b3e
PowerBoard LPM
TimotheeeNiven Feb 10, 2025
8cf13d1
Needed to add timer and I2C so auto-gen code is correct. Adding GPIO…
jeremy-syn Feb 13, 2025
b038aeb
Needed to add timer and I2C so auto-gen code is correct. Adding GPIO…
jeremy-syn Feb 13, 2025
72dbfdc
Needed to add timer and I2C so auto-gen code is correct. Adding GPIO…
jeremy-syn Feb 13, 2025
4039cdb
removed wav capture code from streaming processing function
jeremy-syn Feb 13, 2025
27e1f87
changed uart1 baud rate to 115200
jeremy-syn Feb 13, 2025
df6b844
added interrupt EXTI15 on pin G15
jeremy-syn Feb 13, 2025
26dbc0f
added interrupt EXTI15 on pin G15
jeremy-syn Feb 13, 2025
9a70fb6
added interrupt EXTI15 on pin G15
jeremy-syn Feb 13, 2025
1a016af
Log File Implmentations, DO NOT RUN POWERBOARD
TimotheeeNiven Feb 14, 2025
0c31a51
Log File Implmentations, DO NOT RUN POWERBOARD
TimotheeeNiven Feb 14, 2025
9f6592a
Log File Implmentations, DO NOT RUN POWERBOARD
TimotheeeNiven Feb 14, 2025
464563f
interface now captures negative pulses on WW_DET_IN (G15) and can pri…
jeremy-syn Feb 16, 2025
639f0af
changed from timer 16 to timer 2 because it has 32 bits; also filtere…
jeremy-syn Feb 17, 2025
a284ef4
removed some debug code and renamed pin PIN_WW_DETECTED => WW_DETECTED
jeremy-syn Feb 17, 2025
606f456
removed some debug code and renamed pin PIN_WW_DETECTED => WW_DETECTED
jeremy-syn Feb 17, 2025
f0d1362
interface -- reset timer 2 to 0 when beginning to record detections
jeremy-syn Feb 17, 2025
3f7c3e5
AutoDetect Powerboard WIP
TimotheeeNiven Feb 20, 2025
9d4b6c9
Powerboard WIP with Logging
TimotheeeNiven Feb 21, 2025
3a9014b
changed voltage from 3V to 3.3V
jeremy-syn Feb 21, 2025
6f93661
merged in work from Tim Niven's fork
jeremy-syn Feb 21, 2025
c5f20cb
Update README.md
TimotheeeNiven Feb 22, 2025
7475d3b
Update README.md
TimotheeeNiven Feb 22, 2025
b464c10
Update README.md
TimotheeeNiven Feb 22, 2025
4ed2d13
Add files via upload
TimotheeeNiven Feb 22, 2025
5a326db
Rename LPM01A.jpg to LPM01A_old.jpg
TimotheeeNiven Feb 22, 2025
7947c71
Rename LPM01A.JPG to LPM01A.jpg
TimotheeeNiven Feb 22, 2025
a109ea2
Updated Images
TimotheeeNiven Feb 22, 2025
c1d19e6
Rename LPM01A.jpg to LPM01A._toast.jpg
TimotheeeNiven Feb 22, 2025
b5041b9
Add files via upload
TimotheeeNiven Feb 22, 2025
2d7ea3a
Delete benchmark/runner/img/LPM01A_old.jpg
TimotheeeNiven Feb 22, 2025
00ce3cb
Delete benchmark/runner/img/LPM01A._toast.jpg
TimotheeeNiven Feb 22, 2025
465079b
making sww ref implementation follow common protocol
jeremy-syn Mar 3, 2025
ba76af0
updating runner to run streaming wakeword
jeremy-syn Mar 3, 2025
d263856
Merge remote-tracking branch 'tim_niven/streaming_ww_dev' into stream…
jeremy-syn Mar 3, 2025
2f845dc
Update README.md
TimotheeeNiven Mar 3, 2025
c482c46
Merge remote-tracking branch 'tim_niven/streaming_ww_dev' into stream…
jeremy-syn Mar 3, 2025
a55f9c2
changes to runner for streaming ww in progress (not fully working here)
jeremy-syn Mar 5, 2025
c2b1bcd
added variable timeout to send_command to accomodate long commands (l…
jeremy-syn Mar 5, 2025
b48235b
fixed a couple mis-spellings in doc strings
jeremy-syn Mar 5, 2025
96a0df2
changed EE_DEVICE_NAME to 'dut' to work with runner, though it should…
jeremy-syn Mar 6, 2025
e9b5036
commented out unneeded db print; should remove later as long as it do…
jeremy-syn Mar 6, 2025
e95f2e1
in main, fixed case where all_negatives or all_positives == 0; also a…
jeremy-syn Mar 6, 2025
2805e63
fixed order and added delay into stream step of script; and added ret…
jeremy-syn Mar 6, 2025
498964c
streaming ww benchmark runs in the runner, but does not yet compile f…
jeremy-syn Mar 6, 2025
3ba48d5
cleaned up a couple of errors that had gotten into demo notebook
jeremy-syn Mar 7, 2025
6133d7b
modified build_long_wav.py to take arguments and added a 10s easy tes…
jeremy-syn Mar 9, 2025
837cfbf
made build_long_wav deliver 2-chan (stereo) wav files for compatibili…
jeremy-syn Mar 9, 2025
c864dd8
updated build_long_wav to include sample rate and length in _ww_windo…
jeremy-syn Mar 10, 2025
aa50770
AD AUC and Accuracy Update
TimotheeeNiven Mar 18, 2025
fe3e069
Speed/No more Mode Update
TimotheeeNiven Mar 18, 2025
4c1dea3
No more mode
TimotheeeNiven Mar 18, 2025
e6765b9
Powerboard WIP
TimotheeeNiven Mar 18, 2025
3a25d83
Merge branch 'streaming_ww_dev' of https://github.com/TimotheeeNiven/…
TimotheeeNiven Mar 18, 2025
7796894
updated ref sw to use detection threshold set by #define DETECT_THRES…
jeremy-syn Mar 19, 2025
88d52f3
modified play_wave to take optional timeout variable. still need to s…
jeremy-syn Mar 19, 2025
3b11f81
added a pause and a variable timeout in wav play in script step
jeremy-syn Mar 19, 2025
ccd8d56
added code to calculate detection statistics (false pos, etc.)
jeremy-syn Mar 19, 2025
76dd2b2
removed long_wav_ww_windows.json because its info is moved into sww_d…
jeremy-syn Mar 19, 2025
cf5766c
merged changes from tim
jeremy-syn Mar 19, 2025
386bf8d
making PowerManager.board_timestamps_ms a list, to hold all timestamp…
jeremy-syn Mar 19, 2025
7f83583
added is_energy_mode condition to some of the results handling
jeremy-syn Mar 19, 2025
51088b7
changed inference counting to count each cycle as 1 (instead of each …
jeremy-syn Mar 20, 2025
1c0d406
Powerboard WIP 2.0
TimotheeeNiven Mar 20, 2025
8b59370
Accuracy/Performance Updates
TimotheeeNiven Mar 21, 2025
1eaaaed
Accuracy/Performance Updates 2.0
TimotheeeNiven Mar 21, 2025
6a0ac6b
Interface/DUT Co-Working
TimotheeeNiven Mar 25, 2025
752cffc
fixed demo notebook to work with different directory structure
jeremy-syn Mar 26, 2025
1af53ff
Merge remote-tracking branch 'tim_niven/streaming_ww_dev' into stream…
jeremy-syn Mar 26, 2025
426256a
fixed processing of current measurement strings from lpm01a and fixed…
jeremy-syn Mar 26, 2025
32ef6ef
fixed issue where multiple 'stop' commands were hanging the power man…
jeremy-syn Mar 27, 2025
b495c47
now using 'events' from LPM01a based on D7 edges to measure timing. …
jeremy-syn Mar 27, 2025
1377e8d
Old Mode Interface
TimotheeeNiven Mar 28, 2025
0dfea17
ReadMe Update
TimotheeeNiven Mar 28, 2025
c5553de
Delete benchmark/runner/img/L4R5ZI.png
TimotheeeNiven Mar 28, 2025
6726f3f
Delete benchmark/runner/img/LPM01A.jpg
TimotheeeNiven Mar 28, 2025
870f7e4
Old Pictures
TimotheeeNiven Mar 28, 2025
9b2b2f7
Add files via upload
TimotheeeNiven Mar 28, 2025
363d8cd
Rename L4R5ZI.png to L4R5ZI_old.png
TimotheeeNiven Mar 28, 2025
de601cb
Rename L4R5ZI_old.png to L4R5ZI.png
TimotheeeNiven Mar 28, 2025
133cf5b
Rename L4R5ZI.png to L4R5ZI_1.png
TimotheeeNiven Mar 28, 2025
6f3bacf
Rename LPM01A.jpg to LPM01A_1.jpg
TimotheeeNiven Mar 28, 2025
0eb2157
Update README.md
TimotheeeNiven Mar 28, 2025
b9a488f
energy measurement working now. still some debug messages to remove
jeremy-syn Mar 29, 2025
1d8851c
Merge remote-tracking branch 'tim_niven/streaming_ww_dev' into stream…
jeremy-syn Mar 29, 2025
bdb72e8
fixed issue with energy mode
jeremy-syn Mar 29, 2025
9057523
some minor changes to make sww work with recent changes to results pr…
jeremy-syn Mar 30, 2025
a8b2465
added line to strip 2nd channel out of long_wav if it is a stereo wav
jeremy-syn Mar 31, 2025
861b371
put log files in separate directory to avoid clogging main dir
jeremy-syn Mar 31, 2025
31e482f
fixed clocking on SAI to fix sampling rate error -- clock div ratio w…
jeremy-syn Mar 31, 2025
14cb970
fixed discrepancies wrt ref model (input scale factor and when to cli…
jeremy-syn Mar 31, 2025
e6b54a6
removed sww_testing_l4r5zi. all of its functionality is in sww_ref_l…
jeremy-syn Apr 2, 2025
d6b7a64
added pin definitions to pulse D7 for timestamp and D6 for active pro…
jeremy-syn Apr 2, 2025
92cbb59
SWW ref toggles D7 at init, and beginning and end of streaming
jeremy-syn Apr 4, 2025
381b402
sww power mode is mostly running now, but requires a 1sec delay after…
jeremy-syn Apr 4, 2025
ab4f3ea
fixed feature extractor to continue pre-emphasis filter across segmen…
jeremy-syn Apr 5, 2025
3d96081
added 'echo' value in devices.yaml for enhanced interface board.
jeremy-syn Apr 5, 2025
90a8b0a
reduced sleep time from 1s to 0.25s; still need to find root cause
jeremy-syn Apr 6, 2025
9c8d49c
updated images in readme
jeremy-syn Apr 7, 2025
9068c13
minor edits
jeremy-syn Apr 7, 2025
819d55a
added contents for SD_card and sww_data_dir
jeremy-syn Apr 7, 2025
c937ad8
fixed to respect configurable DUT voltages. Also removed dut.yaml an…
jeremy-syn Apr 10, 2025
1e960b3
updated demo notebook because the wav file has moved to .../runner/sd…
jeremy-syn Apr 12, 2025
89399b4
updated documentation and figures
jeremy-syn Apr 13, 2025
63a0a25
added start time to wav playing
jeremy-syn Apr 13, 2025
7e2f5c8
removed extra prints in strww utils
jeremy-syn Apr 14, 2025
a996c0f
add 2 minute test
jeremy-syn Apr 14, 2025
31a417c
added notes on running streaming test
jeremy-syn Apr 14, 2025
72fbf5c
updated demo notebook to use the json test files
jeremy-syn Apr 14, 2025
3f6ba02
Baud Changer Done
TimotheeeNiven Apr 14, 2025
ff13675
Baud Changer Done
TimotheeeNiven Apr 22, 2025
42db64b
Baud Changer 1.2
TimotheeeNiven Apr 22, 2025
550d819
Baud Changer 1.3
TimotheeeNiven Apr 22, 2025
a3f6b21
Baud Changer 1.3
TimotheeeNiven Apr 22, 2025
ecbe8ba
Baud Changer 1.4
TimotheeeNiven Apr 23, 2025
3cd26b9
Baud Changer 1.5
TimotheeeNiven Apr 23, 2025
5fdedaf
Baud Changer 1.6
TimotheeeNiven Apr 23, 2025
39b2b98
New YAML files
TimotheeeNiven Apr 24, 2025
75aedbb
changed detection threshold 120=>115 to align with demo notebook
jeremy-syn Apr 25, 2025
43ec0df
fixed pre-emphasis so correct value is carried over from one frame to…
jeremy-syn Apr 25, 2025
c3438c2
added a test command infer_wav [offset] that will run feature extract…
jeremy-syn Apr 25, 2025
8f255dc
Merge remote-tracking branch 'tim_niven/streaming_ww_dev' into stream…
jeremy-syn Apr 25, 2025
b210ff0
added 30s timeout for infer
jeremy-syn Apr 25, 2025
0a7aabe
changed from_logits in add_qat() to False to be consistent w/ the ini…
Apr 27, 2025
232bac4
removed two preferences files that should not be in repo
jeremy-syn Apr 30, 2025
c7c375b
removed sync_baud; moving to io_manager_enhanced
jeremy-syn May 2, 2025
8cff588
added echo option to constructor
jeremy-syn May 2, 2025
529923b
perf_result is an output; should not be under git control
jeremy-syn May 2, 2025
a4f7ce1
added io.__enter__() before sync_baud to fix crashing
jeremy-syn May 2, 2025
669e3a4
added entry_count to SerialDevice enter()/exit() in case of multiple …
jeremy-syn May 2, 2025
ab41c0d
updated evaluate.py to deal with the json streaming test spec
jeremy-syn May 9, 2025
9e0bba9
changed evaluate.py so it will choose TFLite intepreter or standard m…
jeremy-syn May 9, 2025
fba7d51
added stream_wav_uart.py
jeremy-syn May 9, 2025
30d43a0
added multiple retries on error. switched to logger for some output
jeremy-syn May 10, 2025
8c4bc21
added retry option to send_cmd function.
jeremy-syn May 11, 2025
985ccaa
added db load, setptr, getptr; and extract_features_on_chunk
jeremy-syn May 11, 2025
8d19434
changed tests_accuracy to use all test files
jeremy-syn May 11, 2025
2989079
added --specgram flag to evaluate to let you evaluate model on precom…
jeremy-syn May 11, 2025
0e6ae8b
added --specgram flag to evaluate to let you evaluate model on precom…
jeremy-syn May 11, 2025
7d1f670
Merge branch 'streaming_ww_dev' of https://github.com/mlcommons/tiny …
May 11, 2025
3631530
proposed edits to rules
jeremy-syn May 12, 2025
0a18ee0
changed DUT baud rate back to 115200 for SWW
jeremy-syn May 17, 2025
267cc31
stashing some WIP in the temp branch while I go back and test an olde…
jeremy-syn May 17, 2025
ffa620d
updated reference h5 and tflite models; normalized model file names
May 19, 2025
aae00a3
changed default epochs and l2 values
May 19, 2025
ed84d7e
added some LR scheduling to QAT phase
May 19, 2025
83cbf03
Merge branch 'streaming_ww_dev' of gh-syn:mlcommons/tiny into streami…
May 19, 2025
12a1cac
fixed FP detection logic
jeremy-syn May 19, 2025
1a78537
changed long wav file
jeremy-syn May 19, 2025
31c82f0
changed long wav file
jeremy-syn May 19, 2025
4a3186f
added pulsing of 'active' pin to run_model
jeremy-syn May 21, 2025
9893b39
updated model; set model optimization to 'time'
jeremy-syn May 23, 2025
a46dfb2
modified DUT class to take echo argument
jeremy-syn May 23, 2025
28ca45d
added echo to DUT definition
jeremy-syn May 23, 2025
b0d19eb
Merge branch 'streaming_ww_dev' of gh-syn:mlcommons/tiny into streami…
jeremy-syn May 23, 2025
43be1e6
fixed printf format error
jeremy-syn May 23, 2025
701145f
Merge branch 'tmp_17may_fix_discrep' into streaming_ww_dev
jeremy-syn May 23, 2025
a4eb6ce
reverting devices.yaml; changed DUT baud rates were mistakenly commited
jeremy-syn May 23, 2025
83cf3f2
WIP on adding duty cycle measurement. Added structure, but handler i…
jeremy-syn May 26, 2025
d8d5cfb
duty cycle measurement (recording start and stop times on a 10us cloc…
jeremy-syn May 26, 2025
29eaf03
added echo mode for power manager and most of the support for duty cy…
jeremy-syn May 26, 2025
3f179db
added timeout kw arg to io_manager.send_command
jeremy-syn May 26, 2025
766a23e
fixed an image filename typo and added a couple notes on I2S debug
jeremy-syn May 26, 2025
a30740b
fixed logic so in performance or energy mode, anomaly detection only …
jeremy-syn May 29, 2025
71bae36
added message to the end of the run to indicate the logfile name
jeremy-syn May 29, 2025
9eb4720
fixed case of no loop count specified (e.g.'loop:' instead of 'loop 5…
jeremy-syn May 29, 2025
ac20c02
selectively allocating g_wav_record and g_act_buff, since there is no…
jeremy-syn May 31, 2025
b6af719
restructured memory allocation for wav capture and activation capture…
jeremy-syn May 31, 2025
eaca25e
updated sww reference and runner to optionally capture activation value
jeremy-syn Jun 2, 2025
f1ba43b
updated wav capture function
jeremy-syn Jun 2, 2025
cd795ee
updated connection diagrams to show 'processing' pin -- used for duty…
jeremy-syn Jun 5, 2025
bbceca0
was making a few edits, but now code does not work
jeremy-syn Jun 7, 2025
20d7b7b
added check in case no DUT or interface is present
jeremy-syn Jun 7, 2025
7a9c193
a few local/temp edits were accidentally incorporated into the last c…
jeremy-syn Jun 7, 2025
d7048f1
removed unneeded debug message
jeremy-syn Jun 8, 2025
9f00286
interface board will report error if wav file does not successfully play
jeremy-syn Jun 9, 2025
665f83c
fixed recording of DUT voltage.
jeremy-syn Jun 9, 2025
144234f
added line end to print_tee
jeremy-syn Jun 9, 2025
aee2867
added duty cycle print out to results.txt file and some comments else…
jeremy-syn Jun 9, 2025
3e75a72
fixed some code that relied on DUT name being l4r5zi
jeremy-syn Jun 9, 2025
15ad842
removed unused dut_config argument and parse_dut_config function
jeremy-syn Jun 9, 2025
ae9507e
removed unused dut_voltage and dut_baud arguments. both are folded i…
jeremy-syn Jun 9, 2025
003f56d
updated readme on runner
jeremy-syn Jun 9, 2025
e5a4789
Joulescope Power Update 1.0
TimotheeeNiven Jun 12, 2025
1b1d6d2
JS220 Partially Working
TimotheeeNiven Jun 20, 2025
241aa68
JS220 Trigger 1.0
TimotheeeNiven Jun 20, 2025
99dcbc0
updated notes in readme
jeremy-syn Jun 23, 2025
ccbf466
add try-except for undecodeable (corrupted) characters in serial_devi…
jeremy-syn Jun 23, 2025
222413c
added condition to skip past empty lines in infer response. otherwise…
jeremy-syn Jun 23, 2025
0730c2f
added print out of some debug info if power manager does not respond
jeremy-syn Jun 23, 2025
b4b448e
fixed error in call to get_baud_rate
jeremy-syn Jun 23, 2025
a7fcb37
fixed error in call to print_energy_results
jeremy-syn Jun 23, 2025
5bc1b5d
in error handling in run, cast exception to string so regex would work
jeremy-syn Jun 23, 2025
6ecdaf8
auc and accuracy were backwards. fixed
jeremy-syn Jun 23, 2025
7851b99
JS220 Implimentation
TimotheeeNiven Jun 25, 2025
b42f8f6
JS220 Implimentation
TimotheeeNiven Jun 25, 2025
1e5b80d
Cleanup
TimotheeeNiven Jun 25, 2025
344c3c2
JS vs LPM
TimotheeeNiven Jun 25, 2025
d1bdb00
minor additions to runner readme
jeremy-syn Jun 25, 2025
b4cbab4
removed some results files
jeremy-syn Jun 25, 2025
5158b74
merging js220 from tim's fork
jeremy-syn Jun 25, 2025
6e16fd8
Adding JouleScope JS220 support. Requires libusb and pyusb now.
jeremy-syn Jun 26, 2025
c5af5b3
fixed (again) bad get_baud_rate call that sneaked back in
jeremy-syn Jun 26, 2025
657343a
changed echo for LPM to False (should only be True for debugging)
jeremy-syn Jun 27, 2025
7f3106b
changed stopbits to 1 on DUT lpuart1 in sww ref (connects DUT to inte…
jeremy-syn Jun 27, 2025
394cbeb
added logic to convert a single result (ie no loop in script) to a li…
jeremy-syn Jun 27, 2025
4521f63
fixed energy mode output; enforced 10s minimum
jeremy-syn Jun 29, 2025
09ba0f2
added binary for interface board
jeremy-syn Jun 30, 2025
a3777c9
added notes on installing firmware
jeremy-syn Jun 30, 2025
61489f1
added benchmark-specific devices files
jeremy-syn Jun 30, 2025
a7e5171
added note about DYLD_LIBRARY_PATH to resolve conflicting libusb vers…
jeremy-syn Jun 30, 2025
7159d07
median energy info was not going to results file (only terminal). Fixed
jeremy-syn Jul 1, 2025
a18146d
made required number of cycles 1 for SWW, 5 for others
jeremy-syn Jul 2, 2025
09f3bf8
improved some informational print outs
jeremy-syn Jul 3, 2025
f6f3293
added minor error handling to activation parsing
jeremy-syn Jul 3, 2025
3164509
updated tests scripts for energy and performance
jeremy-syn Jul 3, 2025
d38d183
fixed AUC calculation (replaced with sklearn)
jeremy-syn Jul 6, 2025
8c69ad6
fixed AUC calculation (replaced with sklearn)
jeremy-syn Jul 6, 2025
28c0ecb
Merge branch 'master' into streaming_ww_dev
jeremy-syn Jul 7, 2025
9983cb5
undoing two changes accidentally brought in by merging main->streamin…
jeremy-syn Jul 7, 2025
7a1161d
added disambiguation using check_name property when VID/PID are repeated
jeremy-syn Jul 7, 2025
6216bdf
added multi_class='ovr' to roc_auc_score to avoid errors in multiclas…
jeremy-syn Jul 7, 2025
6b4e30a
fixed roc_auc_score for two-class problem (person detection)
jeremy-syn Jul 11, 2025
5bbde8c
Changed method to avoid erroneous connections when multiple devices h…
jeremy-syn Jul 13, 2025
22b2dc0
fixed tests_performance; they had wrong number of loops and wrong sww…
jeremy-syn Jul 13, 2025
d080bb0
fixed regex patterns to match new runner output
jeremy-syn Jul 14, 2025
fcc5776
made submission checker work with new runner output
jeremy-syn Jul 14, 2025
319cda8
changed submission checker to use pandas dataframe
jeremy-syn Jul 16, 2025
d33fdc8
updated submission checker to process SWW results
jeremy-syn Jul 18, 2025
7dd1ada
fixed some issues with js220 support
jeremy-syn Jul 18, 2025
bc1a117
added retreiving name print statement for debugging help
jeremy-syn Jul 21, 2025
dfa1b51
added duty cycle information to results.txt printout and fixed a coup…
jeremy-syn Jul 21, 2025
fbad9a0
removed line that calculates variable that never gets used
jeremy-syn Jul 21, 2025
b408a71
added per-file info print out to results.txt
jeremy-syn Jul 21, 2025
77267f7
more notes in readme
jeremy-syn Jul 21, 2025
36b48a3
updated L4R5zi hookup image
jeremy-syn Jul 21, 2025
5addbfb
updated submission checker
jeremy-syn Jul 28, 2025
0530ce2
updated rules
jeremy-syn Jul 28, 2025
93b1c5c
Merge branch 'master' of gh-syn:mlcommons/tiny
jeremy-syn Jul 28, 2025
227d747
merged changes from streaming_ww_dev branch
jeremy-syn Jul 28, 2025
4081bdc
merged master back into streaming_ww_dev
jeremy-syn Jul 28, 2025
fc176af
enabled duty cycle measurement and SWW w/ only performance in submiss…
jeremy-syn Jul 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions benchmark/MLPerfTiny_Rules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,16 @@ The suite includes the following benchmarks:
| Visual Wake Words | Binary image classification | Visual Wake Words Dataset | MobileNet | 80% (Top 1)
| Image Classification | Small image classification | Cifar10 | ResNet | 85% (Top 1)
| Anomaly Detection | Detecting anomalies in machine operating sounds | ToyADMOS | Deep AutoEncoder | 0.85 (AUC)
| Streaming Wakeword | Detecting wakewords in a continuous stream of audio| Custom | 1D DS-CNN | TBD
| Streaming Wakeword | Detecting wakewords in a continuous stream of audio| Custom | 1D DS-CNN | <= 8 FP, <= 8 FN
|===


For the quality target, keyword spotting, visual wakewords, and image classification all use top-1 accuracy as the key metric. Anomaly detection
uses the area under the ROC curve (true positive rate vs false positive rate), as computed by
https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html[sklearn.metrics.roc_auc_score].

The streaming wakeword benchmark uses a combination of false positives and false negatives, requiring no more than 8 of either.

==== Relaxed constraints for the Open division

1. An Open benchmark must perform a task matching an existing Closed benchmark, and be substitutable in LoadGen for that benchmark.
Expand All @@ -193,7 +200,8 @@ The suite includes the following benchmarks:


=== EnergyRunner™ benchmark framework
The benchmark suite is run using the EnergyRunner™ benchmark framework from EEMBC, which detects the DUT, sends inputs, and reads outputs over UART. The EEMBC runner is being phased out. It will be permitted for teh KWS, VWW, IC, and AD benchmarks in the summer 2015 submission. After that, only the MLCommons Runner will be permitted. The EEMBC runner does not support the streaming wakeword benchmark.

The benchmark suite is run using the EnergyRunner™ benchmark framework from EEMBC, which detects the DUT, sends inputs, and reads outputs over UART. The EEMBC runner is being phased out. It will be permitted for the KWS, VWW, IC, and AD benchmarks in the summer 2025 submission. After that, only the MLCommons Runner will be permitted. The EEMBC runner does not support the streaming wakeword benchmark.

The EEMBC runner is available here: https://github.com/eembc/energyrunner
The MLCommons runner is available in this repository: https://github.com/mlcommons/tiny/tree/master/benchmark/runner
Expand Down
25 changes: 25 additions & 0 deletions benchmark/runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,25 @@ The device file defines available devices that are automatically detected by the
- **`usb`**: `dict` where the key is `vid` and the value is a `pid` or a list of `pid`s.
- **`usb_description`**: A string used to match the USB description.


#### Adding a New Device
You can use the PySerial module's list_ports function to get the VID and PID of a device as long as it presents as a serial interface
```
jeremy@macbook-pro-16%>python -m serial.tools.list_ports -v
/dev/cu.Bluetooth-Incoming-Port
desc: n/a
hwid: n/a
/dev/cu.usbmodem1403 <<==== This is the reference DUT
desc: STLINK-V3
hwid: USB VID:PID=0483:374E SER=005300313532511531333430 LOCATION=0-1.4
/dev/cu.usbmodem2061398A4D431 <<==== This is the LPM05a power monitor
desc: PowerShield (Virtual ComPort in FS Mode)
hwid: USB VID:PID=0483:5740 SER=2061398A4D43 LOCATION=1-1
/dev/cu.wlan-debug
desc: n/a
hwid: n/a
4 ports found
```
---

### Device Under Test Configuration `dut.yml`
Expand Down Expand Up @@ -272,3 +291,9 @@ If the I2S transfer appears not to be working, here are a few things to try.
### Baud Rate for Interface board:
Located in file /application/user/core/usart.c

<<<<<<< HEAD
=======
### A device with vid:pid XX:YY failed to provide a serial number.
In some cases, multiple devices may have the same VID and PID. For example, on an MCU development board, the VID/PID may be linked to the vendors debugger/programmer (e.g. ST-Link) rather than to the development board specifically. To avoid
Workaround: Use a USB-serial converter so that the offending device presents with a different VID:PID.
>>>>>>> streaming_ww_dev
14 changes: 8 additions & 6 deletions benchmark/runner/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def precheck_device_name(dev_cfg, serial_device, mode):
return True. If the device on <serial_device> does not respond to the
"name%" command, or responds but the name does not match check_name return
False. If the response matches check_name, return True.
Note that this function uses teh 'check_name' property, not 'name', which
Note that this function uses the 'check_name' property, not 'name', which
is mostly arbitrary
** Arguments:
- dev_cfg: device configuration dict from devices.yaml
Expand Down Expand Up @@ -129,10 +129,8 @@ def scan(self):
"""Scan for both serial and USB-only devices and initialize them."""
pending_serial = [p for p in list_ports.comports(True) if p.vid]
matched = []
comport_serial_numbers = []

for p in pending_serial:
comport_serial_numbers.append(p.serial_number)
for d in self._device_defs:
found = False
for vid, pids in d.get("usb", {}).items():
Expand All @@ -154,12 +152,16 @@ def scan(self):
# Additional scan for USB-only devices (non-serial)
all_usb = usb.core.find(find_all=True)
for dev in all_usb:
if dev.serial_number in comport_serial_numbers:
# we already handled this device in the loop on list_ports.comports()
continue
vid = dev.idVendor
pid = dev.idProduct

for d in self._device_defs:
if d.get("interface", "") != "direct_usb":
# this association logic is only for direct (non-serial) devices, like the JS-220.
# so skip it if interface is unspecified or not "direct_usb"
# Without this block, a VID/PID match that has been previously rejected based on
# "name" mismatch can be incorrectly associated here.
continue
for k, v in d.get("usb", {}).items():
if isinstance(v, list):
if pid in v and vid == k:
Expand Down
1 change: 1 addition & 0 deletions benchmark/runner/device_under_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def _retry(self, method, retries=3):

def _get_name(self):
name_retrieved = False
print("Retrieving name from DUT ...")
for l in self._port.send_command("name"):
match = re.match(r'^m-(name)-dut-\[([^]]+)]$', l)
if match:
Expand Down
1 change: 1 addition & 0 deletions benchmark/runner/devices_ad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
0x0483: 0x374B
- name: js220
type: power
interface: direct_usb
preference: 1 # set to higher preference thatn lpm01a to use js220
raw_sampling_rate: 1000000
virtual_sampling_rate: 1000
Expand Down
1 change: 1 addition & 0 deletions benchmark/runner/devices_kws_ic_vww.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
0x0483: 0x374B
- name: js220
type: power
interface: direct_usb
preference: 1 # set to higher preference thatn lpm01a to use js220
raw_sampling_rate: 1000000
virtual_sampling_rate: 1000
Expand Down
1 change: 1 addition & 0 deletions benchmark/runner/devices_sww.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
0x0483: 0x374B
- name: js220
type: power
interface: direct_usb
preference: 1 # set to higher preference thatn lpm01a to use js220
raw_sampling_rate: 1000000
virtual_sampling_rate: 1000
Expand Down
Binary file modified benchmark/runner/img/L4R5Zi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions benchmark/runner/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def print_energy_results(l_results, energy_sampling_freq=1000, req_cycles=5, res
total_inference_energy = np.sum(inference_energy_samples)
num_inferences = res['infer']['iterations']
energy_per_inf = total_inference_energy / num_inferences
latency_per_inf = elapsed_time / num_inferences
inf_energies[inf_num] = energy_per_inf
inf_times[inf_num] = elapsed_time

Expand All @@ -226,6 +225,7 @@ def print_energy_results(l_results, energy_sampling_freq=1000, req_cycles=5, res

# Summarize results
def summarize_result(result, power, mode, results_file=None):
print(20*'-')
num_correct_files = 0
total_files = 0
y_pred = []
Expand All @@ -252,7 +252,7 @@ def summarize_result(result, power, mode, results_file=None):
print_energy_results(result, energy_sampling_freq=1000, results_file=results_file)
return

for r in result:
for res_num,r in enumerate(result):
if 'infer' not in r or 'class' not in r or 'file' not in r:
continue # Skip malformed or error-only entries
infer_data = r['infer']
Expand All @@ -266,7 +266,13 @@ def summarize_result(result, power, mode, results_file=None):

if 'throughput' in infer_data:
throughput_values.append(infer_data['throughput'])

print_tee(f"Performance results for window {res_num+1}", outfile=results_file)
print_tee(f" # Inferences : {infer_data['iterations']}", outfile=results_file)
print_tee(f" Runtime: {infer_data['elapsed_time']/1e6} sec.", outfile=results_file)
print_tee(f" Throughput: {infer_data['throughput']} inf./sec.", outfile=results_file)
if infer_data['elapsed_time']/1e6 > 10.0:
print_tee(f" Runtime requirements have been met.", outfile=results_file)

if file_name not in file_infer_results:
file_infer_results[file_name] = {'true_class': true_class, 'results': []}

Expand Down Expand Up @@ -307,8 +313,11 @@ def summarize_result(result, power, mode, results_file=None):
total_files += 1

accuracy = calculate_accuracy(np.array(y_pred), np.array(y_true))
auc = roc_auc_score(np.array(y_true), np.array(y_pred), multi_class='ovr')


if np.array(y_pred).shape[1] == 2:
auc =roc_auc_score(np.array(y_true), np.array(y_pred)[:,1])
else:
auc =roc_auc_score(np.array(y_true), np.array(y_pred), multi_class='ovr')

current_time = datetime.now()
formatted_time = current_time.strftime("%m%d.%H%M%S ")
Expand Down
Loading