-
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
add int32 support for param seq_length of op reverse_sequence #3774
add int32 support for param seq_length of op reverse_sequence #3774
Conversation
Can one of the admins verify this patch? |
Jenkins, test this please. |
@@ -76,8 +76,8 @@ void CheckErrors(OpKernelContext* context, int batch_dim, int seq_dim) { | |||
} | |||
} | |||
|
|||
template <> | |||
void CheckErrors<GPUDevice>(OpKernelContext* context, int batch_dim, | |||
template <typename Tlen> |
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.
why do you need to template CheckErrors on Tlen? I don't see you using Tlen anywhere.
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'll remove it. I see Jenkins output, and I'll modify gpu version. What does //tensorflow/core/ops/compat:backwards_compatibility_test
do?
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.
cpu version of CheckErrors need Tlen
what does |
template <> | ||
void CheckErrors<GPUDevice, int64>(OpKernelContext* context, int batch_dim, | ||
int seq_dim) { | ||
CheckErrorsGPU(context, batch_dim, seq_dim); |
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 still don't understand why you can't just do:
template <typename Tlen>
void CheckErrors<GPUDevice, Tlen>(...) { check the errors }
?
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.
that's the point, c++11 don't support partial specialization of function templates, really weird.
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.
Only full specialization is allowed for function templates in C++11. Partial specialization is only allowed for class templates.
http://en.cppreference.com/w/cpp/language/partial_specialization
Jenkins, test this please. |
@ebrevdo backwards_compatibility is fixed now. |
@tensorflow-jenkins test this please |
#3528