Skip to content
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

Merged

Conversation

suiyuan2009
Copy link
Contributor

@tensorflow-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@ebrevdo
Copy link
Contributor

ebrevdo commented Aug 12, 2016

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>
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

@suiyuan2009
Copy link
Contributor Author

what does Forward declarations of the functor specializations for GPU. mean ? so many code for gpu specializations.

template <>
void CheckErrors<GPUDevice, int64>(OpKernelContext* context, int batch_dim,
int seq_dim) {
CheckErrorsGPU(context, batch_dim, seq_dim);
Copy link
Contributor

@ebrevdo ebrevdo Aug 17, 2016

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 }

?

Copy link
Contributor Author

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.

Copy link
Member

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

@ebrevdo
Copy link
Contributor

ebrevdo commented Aug 22, 2016

Jenkins, test this please.

@suiyuan2009
Copy link
Contributor Author

@ebrevdo backwards_compatibility is fixed now.

@rmlarsen
Copy link
Member

@tensorflow-jenkins test this please

@rmlarsen rmlarsen merged commit 0999903 into tensorflow:master Aug 23, 2016
@suiyuan2009 suiyuan2009 deleted the fix-reverse_sequence-input-type branch August 24, 2016 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants