Skip to content
Snippets Groups Projects
Unverified Commit d57de627 authored by Yinggang Wang's avatar Yinggang Wang Committed by GitHub
Browse files

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: default avatardaquexian <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: default avatarliufengwei <2472937968@qq.com>
Co-authored-by: default avatardaquexian <daquexian566@gmail.com>
Co-authored-by: default avataroneflow-ci-bot <69100618+oneflow-ci-bot@users.noreply.github.com>
Co-authored-by: default avataroneflow-ci-bot <ci-bot@oneflow.org>
parent c620c55e
No related branches found
No related tags found
Showing
with 44 additions and 14 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment