Commit 11cdc8b
[MOD-9685] Introduce SVS Basic Benchmarks (#829)
* initial imp of training bm
introduce BM_VecSimSVSTrain class with 2 methods: Train and TrainAsync
add GoogleTest to benchmarks so we can use ASSERT_* API
tieredIndexMock: possible to initialize with a specific thread count
add train bemchmark to CI benchmark dispatcher
* make bm_files general for other algs
rename svs_training_fp32 ->svs_indices_training_fp32
add to bm_files.sh
* replace std::formtat only supported from gcc13 with ostringstream
* format
* revrt assert
* intialize quantBits
move svs params init to CreateTieredSVSIndex
only 5 iterations
* move iterawtion logic to runTrainBMIteration
add compressed index bm
* assert depdnding on HAVE_SVS_LVQ
* sepearate non compression and compression bm
* TO REVERT !!! test abort
* fix if else
* revrt timeoutgurard vhanges
* dont pause after training to see how it affrects performance
remove some prints
* fix #ifdef HAVE_SVS_LVQ to #if HAVE_SVS_LVQ
* use pause timers its faster
* do 3 iter instread of 5 and test if results are stable
* use 5 again
* fix download all all script
* fp16 bm
remove 100K
* remove 100K from fp32
* increase timeout
* try bigger machine
* try a bigger machine
* try 2 iter
move UNIT_AND_ITERATIONS and QUANT_BITS_ARGS to bm_vecsim_basics_Svs
* unify bm_training_initialize_fp32.h and bm_training_initialize_fp16.h to bm_training_initialize.h
define DATA_TYPE_INDEX_T in bm_svs_training_fp*.cpp
remove th 10k and 50k for arm
* reevet timeout to 10
fix include header for fp16
* move CreateTieredSVSParams and verifyNumThreads to svs params
* revert increease machine size
* change assert to log
* fix
* fix2
* format
* introduce bm_svs
* add tiered
add NewIndex from existing svs to tiered factory
imp AddLabel
add AddLabelBatches(not implmneted)
take bm_utils from meiravg_svs_training_bm
* introduce setUpdateTriggerThreshold in BUILD_TESTS
move initialize index to a function
introfuce bm function:
addlabel: insert one by one
AddLabelBatches: add in batches with one thread
AddLabelAsync: add in batches with multiple threads
* fix comment
add to yml
* remove lock
* format
* fix num threads in addlabelinplace
fix assertupdateTriggerThreshold in AddLabelAsync
* use train svs instead
* format
* small fixes
* rename BM_VecSimSVSTrain->BM_VecSimSVS
bm_vecsim_svs_train.h->bm_vecsim_svs
* remove unrelated
* align with new name
* revert unnecessary changes in bm_vecsim_index
add LVQ BM if HAVE_SVS_LVQ
* fix include
* fix quantbits
* extract general
* fix missing main on LVQ cpp
* replace vectors file
* run only BENCHMARK_MAIN
* try dummy for mac
* fix DATA_TYPE_INDEX_T definition LVQ
* quantBits is now static and needs to be intizlied by the CPP file
we hard code the name of the data file based on quantBits
* TO REVERT:
benchmark deletsion according to a when we exceed 0.5 index size
this benchmark takes 20K ms (20s) for 500 vectors!!!
that's a lot
after revert - benchmark only gc to detrmine
* REVERT svs.h change consolidation_threshold
runGC instead of delete label to not be depnd on consolidation_threshold that can't be controloed and runs for vrey very long!
* revert unrelated changes
* fix LVQ8 cpp for non LVQ
* foirmat
* cleanups
fix mac
* remove new line in cmake
* Update tests/benchmark/bm_vecsim_svs.h
Co-authored-by: BenGoldberger <[email protected]>
---------
Co-authored-by: BenGoldberger <[email protected]>1 parent 1a15b59 commit 11cdc8b
File tree
13 files changed
+365
-23
lines changed- .github/workflows
- src/VecSim/index_factories
- tests/benchmark
- bm_initialization
- data/svs_indices
- run_files
13 files changed
+365
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
62 | 87 | | |
63 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
64 | 92 | | |
65 | 93 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments