Open
Conversation
Refactor code CUDA and Native backend to match #autumnai/collenchyma/62 that provides enchanced memory management and syncronization. Since memory management is now automatic, `*_plain` variants of functions are removed. BREAKING CHANGE: *_plain versions of API functions are removed, arguments of their counterpart functions may have changed in mutablity. REFERENCE: autumnai/collenchyma#37, autumnai/collenchyma#62
0f92627 to
9d179db
Compare
Refactor tests to be generic on backend and element type, use generic functions to fill input vectors and check outputs. Use macros to instantiate concrete tests for Native/Cuda and f32/f64. Tests are now easier to read and 5-10x shorter. Add randomly generated test vectors for relu, sigmoid, tanh, softmax and log softmax. LRN, pooling and convolution use old test vectors. Convolution test fails the same way it failed before restructure.
9d179db to
10bbb6e
Compare
Author
|
I've converted all remaining tests, though I haven't created new random test vectors for them, and convolution test fails as it did before. So this patchset is likely complete and can be merged after I'll convert Well that and I'll have to manually integrate #46 after it's meged -- I've noticed too late that @DiamondLovesYou and I have substantially refactored the same files. |
Convert and use macros to make benches definitions more compact. Implement benches for Cuda, though they take ages to complete. Since benches are moved in main source tree, feature flag "unstable" is used to conditionally compile them. BREAKING CHANGE: use cargo flag "unstable" to compile benches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements support for better sync API: autumnai/collenchyma#37, autumnai/collenchyma#62. Scope is a bit wider, actually, since I've also refactored tests, they are 5-10 times shorter now without any drawbacks.
It's WiP, there are still unconverted tests. I think it'll take a few more days.