Add NCHW data layout support to BATCH_TO_SPACE_ND.

Add an optional parameter data_layout to BATCH_TO_SPACE_ND op for NCHW
data layout support. Create testcases and generate test.

Provide reference CPU implementation for NCHW support. The native layout
for CPU implementation is still NHWC. Appropriate transpositions are
applied for NCHW input/output.

Bug: 112320705

Test: NeuralNetworksTest_static
Change-Id: Ie4aa8c7cc949d4b673daebf635fdd2149fcd4a1c
Merged-In: Ie4aa8c7cc949d4b673daebf635fdd2149fcd4a1c
(cherry picked from commit 923eecee814aa17016893f8d8efa2318f5a367c2)
10 files changed
tree: e1f8c6ac8998143b700c7efc2e20c7cbf48217f4
  1. nn/
  2. .clang-format
  3. CleanSpec.mk
  4. OWNERS
  5. PREUPLOAD.cfg