-
Notifications
You must be signed in to change notification settings - Fork 119
TOOLS: perftest add matrix generator #1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
TOOLS: perftest add matrix generator #1220
Conversation
395e944 to
81d74f2
Compare
Greptile Overview
|
| Filename | Score | Overview |
|---|---|---|
| tools/perf/generator/ucc_pt_generator_traffic_matrix.cc | 2/5 | New traffic matrix generator with critical division-by-zero bug in bias probability calculation (line 86) |
| tools/perf/ucc_pt_config.cc | 4/5 | Adds command-line parsing for matrix generator and seed parameter with proper error handling |
| tools/perf/ucc_pt_benchmark.cc | 5/5 | Integrates matrix generator with proper type checking for ALLTOALLV operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 9 comments
3ad787f to
08bac56
Compare
849964b to
746b197
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 5 comments
|
|
||
| size_t ucc_pt_generator_traffic_matrix::get_count_max() | ||
| { | ||
| auto matrix = pattern_counts[current_pattern]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: copying entire vector instead of using const reference, causes unnecessary memory allocation
ikryukov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use clang format file from repo to format code
| #include <numeric> | ||
| #include <stdexcept> | ||
|
|
||
| std::default_random_engine generator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we avoid global variables?
746b197 to
867fb69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 1 comment
| probabilities[bias_index] *= bias_factor; | ||
| } | ||
| } | ||
| int sum = std::accumulate(probabilities.begin(), probabilities.end(), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: integer accumulator truncates doubles to 0, causing division by zero on line 88
| int sum = std::accumulate(probabilities.begin(), probabilities.end(), 0); | |
| double sum = std::accumulate(probabilities.begin(), probabilities.end(), 0.0); |
Add Matrix generator option to pt generator for A2AV matrices.
This PR adds matrix creation based on this repo
4 kinds of matrices -
0. Basic A2AV (uniform traffic)
run with --gen matrix:kind={0-3}@token_size_KB_mean=N@num_tokens=M@tgt_group_size_mean=K
token_size_KB_mean, num_tokens, tgt_group_size_mean will get default values if not set.