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
Add support for handling uint32 and uint64 dtypes in batch_util CopySliceToElement and MaybeMoveSliceToElement #28776
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,8 @@ Status CopySliceToElement(const Tensor& parent, Tensor* element, int64 index) { | |
switch (parent.dtype()) { | ||
TF_CALL_ALL_TYPES(HANDLE_TYPE); | ||
TF_CALL_QUANTIZED_TYPES(HANDLE_TYPE); | ||
TF_CALL_uint32(HANDLE_TYPE); | ||
TF_CALL_uint64(HANDLE_TYPE); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can go ahead and add them there too. Thanks. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can verify that this works by adding a test to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, will do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
#undef HANDLE_TYPE | ||
default: | ||
return errors::Unimplemented("CopySliceToElement Unhandled data type: ", | ||
|
@@ -180,6 +182,8 @@ Status MaybeMoveSliceToElement(Tensor* parent, Tensor* element, int64 index) { | |
switch (parent->dtype()) { | ||
TF_CALL_ALL_TYPES(HANDLE_TYPE); | ||
TF_CALL_QUANTIZED_TYPES(HANDLE_TYPE); | ||
TF_CALL_uint32(HANDLE_TYPE); | ||
TF_CALL_uint64(HANDLE_TYPE); | ||
#undef HANDLE_TYPE | ||
default: | ||
return errors::Unimplemented( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the test here, could you also add a Python-level test to
from_tensor_slices_test.py
? Thanks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done