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

fix upsample bug #5753

Merged
merged 11 commits into from
Aug 7, 2021
2 changes: 1 addition & 1 deletion oneflow/user/kernels/upsample_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ OF_DEVICE_FUNC T cubic_convolution2(const T x, const T A) {

template<typename T>
OF_DEVICE_FUNC void get_cubic_upsample_coefficients(T coeffs[4], const T t) {
T A = -0.75;
float A = -0.75;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix has accually no effect.
A will be passed to the second parameter typed const T of cubic_convolution1<T> and cubic_convolution2<T>, and obviously an implicit cast will be performed due to T = int.


T x1 = t;
coeffs[0] = cubic_convolution2<T>(x1 + 1.0, A);
Expand Down