-
Notifications
You must be signed in to change notification settings - Fork 469
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
Perf/dynamic mm slice adressing #1917
Conversation
…rging (there is a bug with slice padding)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1917 +/- ##
==========================================
+ Coverage 85.02% 85.07% +0.04%
==========================================
Files 790 790
Lines 93275 93256 -19
==========================================
+ Hits 79310 79335 +25
+ Misses 13965 13921 -44 ☔ View full report in Codecov by Sentry. |
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.
Some minor changes
const MB: usize = 1024 * 1024; | ||
fn main() { | ||
let start = std::time::Instant::now(); | ||
println!("Hello world!"); |
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.
to be removed
} else { | ||
return false; | ||
} |
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.
This else is not really useful
slice_id.copied() | ||
} | ||
|
||
fn insert_slice(&mut self, position: usize, slice: &Slice) { |
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.
position => address
Pull Request Template
Checklist
run-checks all
script has been executed.Related Issues/PRs
#1752
Changes
Merging of slices was slow (removing from a vector O(n)). Switching to a memory page type of strategy where we index based on the offset of the memory slice. The offset is used to index into the memory page table. Since it's a HashMap removing a slice is done in O(1) time.
Testing
Ran Mnist workload and it improved speed quite a lot.