Add NCHW data layout support to SPACE_TO_DEPTH.

Add an optional parameter data_layout to SPACE_TO_DEPTH 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: I9c55a3a677cad19fc0ad6671eb4362802b655a0b
Merged-In: I9c55a3a677cad19fc0ad6671eb4362802b655a0b
(cherry picked from commit 20ae9a93f1c81e248728ee22da103c8dbbedc931)
10 files changed
tree: 2a12a68757c18a5bdfb21cdae572791a3867f8e3
  1. nn/
  2. .clang-format
  3. CleanSpec.mk
  4. OWNERS
  5. PREUPLOAD.cfg