-
Notifications
You must be signed in to change notification settings - Fork 125
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
Miki/msm-optimiations #794
base: main
Are you sure you want to change the base?
Conversation
@@ -42,22 +42,28 @@ class Msm | |||
} | |||
|
|||
// run MSM based on pippenger algorithm | |||
void run_msm(const scalar_t* scalars, const A* bases, P* results) | |||
void run_msm(const scalar_t* scalars, const A* bases, P* results, bool last_task_on_batch) |
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.
I think it's last_task_in_batch? instead of on_batch
phase3_final_accumulator(results); | ||
m_phase3_thread = nullptr; | ||
} else { | ||
m_phase3_thread = new std::thread(&Msm::phase3_final_accumulator, this, results); |
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.
I don't see that you release it so you leak memory. Why not a unique_ptr? you can still have it nullptr
@@ -217,18 +226,35 @@ class Msm | |||
} | |||
} | |||
|
|||
// // phase 2: accumulate m_segment_size buckets into a line_sum and triangle_sum |
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.
do you need this code?
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 you please elaborate which case you checked (curve, size) and the before/after performance? and for which HW
avoid scalar copy
improve c formula