Skip to content

Commit 697543f

Browse files
dsharletgxnnpack-bot
authored andcommitted
Fix split-fuse in YNNPACK
YNNPACK treats out of bounds dimensions as broadcasts, so splitting and fusing them is not an error. PiperOrigin-RevId: 935081497
1 parent d0aa6a4 commit 697543f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/subgraph/split-fuse.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ void FuseAndSplit() {
154154
}
155155
}
156156

157+
#ifndef XNNPACK_USE_YNNPACK
157158
// A large fuse/split axis makes `axis + count` wrap past SIZE_MAX, so the
158159
// `> XNN_MAX_TENSOR_DIMS` range check used to pass. For fuse_dims the oversized
159160
// count then writes past the end of a XNN_MAX_TENSOR_DIMS stack array, and the
@@ -209,6 +210,7 @@ TEST(SplitDim, large_axis_rejected) {
209210

210211
xnn_delete_subgraph(subgraph);
211212
}
213+
#endif // XNNPACK_USE_YNNPACK
212214

213215
TEST(FuseAndSplitQS8, test) { FuseAndSplit<quantized<int8_t>>(); }
214216
TEST(FuseAndSplitQU8, test) { FuseAndSplit<quantized<uint8_t>>(); }

0 commit comments

Comments
 (0)