Support 0shape tensor (#5620)
* feat(Tensor): support 0shape tensor * math binary broadcast support emoty tensor input * slice support empty tensor input and output * fix check in slice * test(Cat): add 0shape cat module test * fix return type error on gcc 4.8.5 Signed-off-by:daquexian <daquexian566@gmail.com> * auto format by CI * add module op test for empty tensor, cuda kernel support empty tensor * format * feat(ReduceOp): reduce op kernels support 0shape tensor * delete files added by mistake * refine if * refine if * feat(ConstantOp): constant ops support 0shape tensor * feat(ReshapeOp): reshape kernel support 0shape tensor * math binary and unary backward skip when elem equal to zeros * fix(ReduceOp): fix reduce not memset bug * support getitem output empty tensor * fix comment * getitem support input is empty * reduce_like kernel support empty * fix op test bug * feat(ReduceOp): refine reduce ops initialize value * format code * fix triu bug when input is empty * test(AbsOp): fix test bug * test(DivOp): fix test bug * fix clamp bug * fix test_sub bug * fix(ReduceOp): fix reduce op memset bug * auto format by CI * fix random Co-authored-by:
liufengwei <2472937968@qq.com> Co-authored-by:
daquexian <daquexian566@gmail.com> Co-authored-by:
oneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com> Co-authored-by:
oneflow-ci-bot <ci-bot@oneflow.org>
Showing
- oneflow/api/python/functional/indexing.cpp 0 additions, 2 deletionsoneflow/api/python/functional/indexing.cpp
- oneflow/core/functional/impl/array_functor.cpp 0 additions, 2 deletionsoneflow/core/functional/impl/array_functor.cpp
- oneflow/core/functional/tensor_index.cpp 2 additions, 3 deletionsoneflow/core/functional/tensor_index.cpp
- oneflow/core/kernel/kernel_util.cu 3 additions, 0 deletionsoneflow/core/kernel/kernel_util.cu
- oneflow/core/kernel/util/cuda_arithemetic_interface.cu 1 addition, 0 deletionsoneflow/core/kernel/util/cuda_arithemetic_interface.cu
- oneflow/core/kernel/util/cuda_dnn_interface.cu 1 addition, 0 deletionsoneflow/core/kernel/util/cuda_dnn_interface.cu
- oneflow/core/ndarray/ndarray_apply_binary_core.cu 2 additions, 0 deletionsoneflow/core/ndarray/ndarray_apply_binary_core.cu
- oneflow/core/ndarray/ndarray_apply_broadcast_binary.h 3 additions, 1 deletiononeflow/core/ndarray/ndarray_apply_broadcast_binary.h
- oneflow/core/ndarray/ndarray_apply_broadcast_binary_core.cu 2 additions, 0 deletionsoneflow/core/ndarray/ndarray_apply_broadcast_binary_core.cu
- oneflow/core/ndarray/ndarray_apply_broadcast_unary_core.cu 1 addition, 0 deletionsoneflow/core/ndarray/ndarray_apply_broadcast_unary_core.cu
- oneflow/core/ndarray/ndarray_apply_unary_core.cu 1 addition, 0 deletionsoneflow/core/ndarray/ndarray_apply_unary_core.cu
- oneflow/core/ndarray/ndarray_assign_core.cu 1 addition, 0 deletionsoneflow/core/ndarray/ndarray_assign_core.cu
- oneflow/user/kernels/add_n_kernel.cu 1 addition, 1 deletiononeflow/user/kernels/add_n_kernel.cu
- oneflow/user/kernels/clip_by_value_kernel.cu 2 additions, 0 deletionsoneflow/user/kernels/clip_by_value_kernel.cu
- oneflow/user/kernels/concat_kernel.cpp 1 addition, 0 deletionsoneflow/user/kernels/concat_kernel.cpp
- oneflow/user/kernels/constant_kernel.cpp 2 additions, 1 deletiononeflow/user/kernels/constant_kernel.cpp
- oneflow/user/kernels/empty_kernel.cpp 0 additions, 4 deletionsoneflow/user/kernels/empty_kernel.cpp
- oneflow/user/kernels/math_binary_elementwise_kernel.cu 6 additions, 0 deletionsoneflow/user/kernels/math_binary_elementwise_kernel.cu
- oneflow/user/kernels/math_unary_elementwise_kernel.cu 4 additions, 0 deletionsoneflow/user/kernels/math_unary_elementwise_kernel.cu
- oneflow/user/kernels/reduce_kernel.cpp 11 additions, 0 deletionsoneflow/user/kernels/reduce_kernel.cpp
Please register or sign in to comment