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 bicubic interpolate cuda kernel bug #7916

Closed
wants to merge 7 commits into from

Conversation

BBuf
Copy link
Contributor

@BBuf BBuf commented Mar 28, 2022

fix bicubic interpolate cuda kernel bug.

@@ -105,7 +105,7 @@ __global__ void UpsampleBicubic2dBackward(const int64_t elem_cnt, const T* dy_dp
get_cubic_upsample_coefficients<T>(x_coeffs, t_x);
get_cubic_upsample_coefficients<T>(y_coeffs, t_y);

for (int64_t c = 0; c < channels; c++) {
for (int64_t c = 0; c < channels * nbatch; c++) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bug的原因在这里,在batch>1时只有第一个batch位置会被计算梯度,导致bug。

oneflow/user/kernels/upsample_kernel.h Outdated Show resolved Hide resolved
python/oneflow/test/modules/test_upsample.py Outdated Show resolved Hide resolved
oneflow/user/kernels/upsample_bicubic2d_kernel.cu Outdated Show resolved Hide resolved
oneflow/user/kernels/upsample_kernel.h Outdated Show resolved Hide resolved
@BBuf
Copy link
Contributor Author

BBuf commented Mar 29, 2022

这里的改动直接合并到韩彬彬的pr里免得跑2次ci浪费时间。此pr就关闭了。

@BBuf BBuf closed this Mar 29, 2022
@BBuf BBuf deleted the fix_bicubic_interpolate_bug branch April 13, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants