Fix null ptr dereference in REDUCE_* cpu implementation

When asked to reduce across all dimensions, reduce would produce a
zero-sized tensor without dimensions and cause segmentation fault in the
implementation.

The change fixes the bug by making the op output a tensor of size [1] in
this case.

Also, updated the bug to clarify this behaviour.

Bug: 155508675
Test: NNTest_static
Change-Id: Ie98d8fa2e508255fd50f6bd8184dc323ba90fac8
15 files changed
tree: 9264bf116684f109cddddb18a0a578a24dce752e
  1. nn/
  2. .clang-format
  3. CleanSpec.mk
  4. CPPLINT.cfg
  5. OWNERS
  6. PREUPLOAD.cfg