-
Notifications
You must be signed in to change notification settings - Fork 74k
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
[XLA] Fix compilation errors in exhaustive test #30434
Changes from 3 commits
bef6b1c
c6b8a97
1ba4fd1
20f510c
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 |
---|---|---|
|
@@ -369,7 +369,8 @@ class Exhaustive32BitOrLessUnaryTest | |
// type being tested. | ||
template <typename T> | ||
void FillInput(Literal* input_literal) { | ||
using IntegralT = typename IntegralTypeWithByteWidth<sizeof(T)>::type; | ||
using IntegralT = | ||
typename test_util::IntegralTypeWithByteWidth<sizeof(T)>::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. I realized that this is not use, we can replace the use of IntegralT in the routine with int64. 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. ok. 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. are you sure this is true? IntegralT is a type which depends on the template type T. This does vary from use to use of FillInput. 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. Yes, IntegralT was left here while it should be remove after I added ConvertAndReplaceKnownIncorrectValueWith. If input_val is a int64, ConvertAndReplaceKnownIncorrectValueWith will convert it to IntegralT.
|
||
int64 input_size = input_literal->element_count(); | ||
int64 begin, end; | ||
std::tie(begin, end) = std::get<1>(GetParam()); | ||
|
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.
After we remove the use of this template in the exhaustive_unary_test.cc, would it be better to put this back to the class as "private" or use anonymous namespace here?
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.
you still cannot have a specialization of a template class embedded inside a class in official c++. so it has to remain in a separate namespace.
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.
although it could be an anonymous namespace as you say
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.
see comment above - i don't think that IntegralT can be removed from the FillInput function
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.
See my reply above - I think we should be able to remove IntegralT from FillInput.
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.
I understand that IntegralT is not int64, but we can still replace IntegralT with int64 here, because ConvertAndReplaceKnownIncorrectValueWith will ensure that we will retrieve the right bits from input_val. I am approving this and will make the change I am talking about later.