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
All devices are equal! #196
Merged
Merged
Conversation
This file contains 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
ANE, CPU and OCL all now support all tests. However tests are not currently passing on GPU and I cannot test on CPU. Failing GPU test are not an issue caused by this update. Tests have not been passing due to a missing "six" required installation. OpenCL Tests have not been run since commit: 1a1c63a devices have 3 types and are handle by a new DeviceTypes enum. (The goal is to revert to Tensor.<type>, but this current setup allows for keyword argument defaults: `device=DeviceType.CPU`) All references to Tensor.GPU/CPU/ANE as been converted to the corresponding `DeviceTypes` enum. Refactor of the conversion code to allow for any device to any device conversion.
Before ready to review:
|
Move six into gpu required installs. Remove six from standard installation.
Closed
geohot
reviewed
Dec 14, 2020
geohot
reviewed
Dec 14, 2020
geohot
reviewed
Dec 14, 2020
geohot
reviewed
Dec 14, 2020
Very nice, much needed. Let's clean it up |
Also reduce code with .to and .to_
Important API change:
This now matches I do recommend that in the future this is changed to Tensor now also supports:
|
@geohot Can't test ANE personally. |
Congrats, nice PR! |
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 aims to resolve 4 issues:
Sorry, but this will be long.
1. No tests for ANE
Test calls have been added for the ANE device which will envoke ANE tensors when running tests. Same as GPU
2. Device to device conversion
To be able to support ANE in tests, it is required that ANE support the same conversion as CPU->GPU and GPU->CPU.
I have created a universal any to any converter. This function accepts any of the accepted datatypes (GPUBuffer, ane.tensor and any np.ndarray compatible data) and returns the converted data.
3. Failure to run GPU Tests
CI tests have not been run since 1a1c63a. This appears to have been caused by a missing
six
dependency that was thrown inside the try except for importingpyopencl
, therefore defaultingGPU=False
4. Failing GPU tests
GPU tests are failing. Don't think I caused it as it is accuracy asserts being raised, but not 100%:
i.e.
Potentially a change since OpenCL tests last passed.