Add more upsample kernel (#5382)
* fix upsample nearest bug * fix upsample nearest bug (#5347) Co-authored-by:oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> * fix upsample bilinear bug * fix upsample bilinear bug * recover code * align with pytorch * redesign upsample bilinear * fix align corner bug * align bilinear with pytorch * fix conflict * fix bug * code reuse * fix commets * add upsample_linear_1d_user_op * add upsample_linear_1d_user_op * add linear1d interp cpu kernel * add linear1d interp gpu kernel * rename kernel name * add upsample nearest_1d kernel * add upsample nearest_1d cuda kernel * add upsample nearest_1d op * fix complie bug * add bicubic interp cpu kernel forward * add bicubic2d interp cpu kernel backward impl * add bicubic2d gpu kernel impl * fix bicubic kernel compile error * add bicubic2d kernel register * fix compile bug * nearest3d interp cpu kernel * add nearest3d gpu kernel * add nearest3d kernel registry * add nearest3d cpu kernel * add nearest3d cpu kernel * add nearest3d cpu kernel * fix upsample nearest interp bug * fix upsample nearest interp bug * add trilinear3d cpu kernel forward * add trilinear3d cpu kernel backward * add trilinear gpu kernel impl * add trilinear op registry * init interpolate nn function * add upsample functors * add interolate module * add interpolate test_case * restruct upsample_nearest2d and upsample_bilinear2d * add upsample nearest2d and bilinear2d op registry * add upsample nearest2d and bilinear2d op registry * add upsample kernel grad functor * add upsample_nearest_2d backward * add upsample_linear_1d backward * add upsample_nearest_1d backward * add upsample_bicubic_2d backward * fix backward impl bug * fix nearest1d backward bug * try to fix backward segmentfault * add data_format parammeter * fix upsample kernel backward bug * fix cuda kernel impl bug * fix upsample nearest bug * fix align_corner attr error * align linear1d impl with pytorch * fix trilinear register bug * fix trilinear bug * add trilinear aligncorners test * add test for bicubic, still has bug * reimpl bicubic2d kernel * align cubic interpolate with pytorch * add bicubic cuda kernel * fix bug * align api with pytorch * add doctest for interpolate * update interpolate docs * fix comments * fix check_of_return comment * fix comment * fix comments * fix commnet * fix comment * fix comments * fix comments * fix comments * fix comments * fix comment Co-authored-by:
oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> Co-authored-by:
Luyang <flowingsun007@163.com>
Showing
- docs/source/experimental.rst 1 addition, 0 deletionsdocs/source/experimental.rst
- oneflow/core/autograd/gradient_funcs/upsample.cpp 320 additions, 0 deletionsoneflow/core/autograd/gradient_funcs/upsample.cpp
- oneflow/core/functional/functional_api.yaml 84 additions, 0 deletionsoneflow/core/functional/functional_api.yaml
- oneflow/core/functional/impl/array_functor.cpp 296 additions, 0 deletionsoneflow/core/functional/impl/array_functor.cpp
- oneflow/python/nn/modules/interpolate.py 318 additions, 0 deletionsoneflow/python/nn/modules/interpolate.py
- oneflow/python/test/modules/test_interpolate.py 395 additions, 0 deletionsoneflow/python/test/modules/test_interpolate.py
- oneflow/user/kernels/upsample_bicubic2d_kernel.cpp 183 additions, 0 deletionsoneflow/user/kernels/upsample_bicubic2d_kernel.cpp
- oneflow/user/kernels/upsample_bicubic2d_kernel.cu 222 additions, 0 deletionsoneflow/user/kernels/upsample_bicubic2d_kernel.cu
- oneflow/user/kernels/upsample_bilinear_2d_kernel.cpp 172 additions, 0 deletionsoneflow/user/kernels/upsample_bilinear_2d_kernel.cpp
- oneflow/user/kernels/upsample_bilinear_2d_kernel.cu 174 additions, 0 deletionsoneflow/user/kernels/upsample_bilinear_2d_kernel.cu
- oneflow/user/kernels/upsample_kernel.h 78 additions, 0 deletionsoneflow/user/kernels/upsample_kernel.h
- oneflow/user/kernels/upsample_linear_1d_kernel.cpp 148 additions, 0 deletionsoneflow/user/kernels/upsample_linear_1d_kernel.cpp
- oneflow/user/kernels/upsample_linear_1d_kernel.cu 151 additions, 0 deletionsoneflow/user/kernels/upsample_linear_1d_kernel.cu
- oneflow/user/kernels/upsample_nearest_kernel.cpp 369 additions, 0 deletionsoneflow/user/kernels/upsample_nearest_kernel.cpp
- oneflow/user/kernels/upsample_nearest_kernel.cu 360 additions, 0 deletionsoneflow/user/kernels/upsample_nearest_kernel.cu
- oneflow/user/kernels/upsample_trilinear_3d_kernel.cpp 218 additions, 0 deletionsoneflow/user/kernels/upsample_trilinear_3d_kernel.cpp
- oneflow/user/kernels/upsample_trilinear_3d_kernel.cu 221 additions, 0 deletionsoneflow/user/kernels/upsample_trilinear_3d_kernel.cu
- oneflow/user/ops/upsample_op.cpp 510 additions, 0 deletionsoneflow/user/ops/upsample_op.cpp
Please register or sign in to comment