[New Operator] Added ConvertTo operator #104
Open
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.
Motivation
Adds the C++ and Python implementations of the ConvertTo operator that converts the data type of an input tensor to a different data type for the output tensor.
Technical Details
The ConvertTo operator is used for converting a tensor from one data type to another. Works for all data types except unsigned int32.
Test Plan
The PR also includes the C-Model against which the host and device kernels are checked. Includes tests for 1, 3 and 4 channels for various different data types. Also has the Python Pytest test which does tests on all permutations of data types and channels.
Test Result
All C++ and Python tests pass.
Submission Checklist