Skip to content
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

Improve allocation caching #709

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
935810f
improve TensorCache api; move buffer conversion logic to CacheStorage
nkoppel Apr 16, 2023
0a2d7d9
split an assert; run cargo fmt
nkoppel Apr 16, 2023
347b24b
reduce visibility of internals; add safety comments
nkoppel Apr 16, 2023
f055ae5
create safe wrapper around CacheStorage objects
nkoppel Apr 16, 2023
1697002
run cargo fmt
nkoppel Apr 16, 2023
240553c
add check_key method to ensure CacheWrappers are used with valid keys
nkoppel Apr 16, 2023
101497e
typo; run cargo fmt
nkoppel Apr 16, 2023
ea73294
add shrink method
nkoppel Apr 16, 2023
9efc215
document ignore_drops; fix constraint violations
nkoppel Apr 16, 2023
e99a2ae
fix another constraint violation; fix TensorCache::len
nkoppel Apr 16, 2023
76798c9
add size parameter to enable_cache and add set_cache_size
nkoppel Apr 17, 2023
e1f4622
remove len argument from TensorCache::insert; add test for cache
nkoppel Apr 19, 2023
7476b80
run cargo fmt
nkoppel Apr 19, 2023
80c20e7
fix clippy error
nkoppel Apr 19, 2023
ed24740
Merge branch 'main' into caching
nkoppel Apr 19, 2023
3d443ba
remove debug print statements
nkoppel Apr 20, 2023
9761e41
improve documentation
nkoppel Apr 21, 2023
aef3be9
add 'in bytes' to enable_cache documentation
nkoppel Apr 21, 2023
59ed3b1
add CacheSize enum
nkoppel Apr 22, 2023
902529e
run cargo fmt
nkoppel Apr 22, 2023
a2a565d
further clarify comment; remove align to 16 check
nkoppel Apr 24, 2023
58518e2
add check to minimize RwLock operations in shrink; export CacheSize
nkoppel Apr 24, 2023
5a03b08
run cargo fmt
nkoppel Apr 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ mod cuda {
let out = out.lines().collect::<Vec<&str>>();
let mut codes = Vec::with_capacity(out.len());
for code in out {
let code = code.split("_").collect::<Vec<&str>>();
if code.len() != 0 && code.contains(&"sm") {
let code = code.split('_').collect::<Vec<&str>>();
if !code.is_empty() && code.contains(&"sm") {
coreylowman marked this conversation as resolved.
Show resolved Hide resolved
if let Ok(num) = code[1].parse::<usize>() {
codes.push(num);
}
Expand Down