-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor synchronization #62
base: master
Are you sure you want to change the base?
Commits on Apr 18, 2016
-
refactor/tensor: refactor synchronization and memory access interface
Remove methods `sync()`, `get()`, `get_mut()`, `remove_copy()` of `SharedTensor` and introduce new set of methods: `read()`, `read_write()`, `write_only()`, `drop_device()`. Signature of `SharedTensor::new()` has also changed. New API has following benefits: - limited checks of use of uninitialized memory, - better memory tracking: several memories can be simultaneously marked as up-to-date, so some synchronization operations might be skipped, - backing memory is automatically allocated on the first use and added to `SharedTensor`, even if it's immutable. Mutability is required only for reshaping, modifying actual data and dropping memories. Rationale and design decisions are discussed at the corresponding bugtracker issue. BREAKING CHANGE: sync and memory management API of `SharedTensor` CLOSE: autumnai#37
Configuration menu - View commit details
-
Copy full SHA for c1eb168 - Browse repository at this point
Copy the full SHA c1eb168View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c4918b - Browse repository at this point
Copy the full SHA 9c4918bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f76ced4 - Browse repository at this point
Copy the full SHA f76ced4View commit details -
test/tensor: add several compile tests for SharedTensor API
Implementation of SharedTensor uses `unsafe` to extend lifetime of memory references that are returned by read/write family of methods. Those tests verify that attempts to create dangling pointers or otherwise misuse API fail at compile time.
Configuration menu - View commit details
-
Copy full SHA for df02d48 - Browse repository at this point
Copy the full SHA df02d48View commit details -
refactor/tensor: remove unused error types
During refactoring (autumnai#37) several error were upgraded into panics. Those errors may happen only if internal logic of `SharedTensor` is incorrect and leads to inconsistent state and broken invariants.
Configuration menu - View commit details
-
Copy full SHA for 947d966 - Browse repository at this point
Copy the full SHA 947d966View commit details
Commits on Apr 19, 2016
-
fix/benches: fix benches after refactoring of memory access API [SKIP…
…_CHANGELOG] REFERENCE: autumnai#37
Configuration menu - View commit details
-
Copy full SHA for 926f1e3 - Browse repository at this point
Copy the full SHA 926f1e3View commit details
Commits on Apr 23, 2016
-
feat/plugin: impl From<tensor::Error> for plugin::Error
Since plugin operations rely on `SharedTensor`'s memory access and allocation API, they need to proxy errors. This commit adds new error enum entry to plugin::Error, and removes deprecated plugin::Error::MissingMemoryForDevice. It also adds autoconversion from plugin::Error::SharedTensor for convenient use of `try!`.
Configuration menu - View commit details
-
Copy full SHA for 753a773 - Browse repository at this point
Copy the full SHA 753a773View commit details -
refactor/tensor: return
SharedTensor
fromnew
instead of `Result<……..>` Allocation of `SharedTensor` may fail only on OOM, so returning `Result` type is redundant.
Configuration menu - View commit details
-
Copy full SHA for 6a21c7f - Browse repository at this point
Copy the full SHA 6a21c7fView commit details