Commit 9400da1
authored
Arm backend: Complete TOSA dialect shape ops (pytorch#20062)
Add fake-kernel support for the remaining TOSA shape operators:
SLICE_SHAPE, EXP2_SHAPE, LOG2_CEIL_SHAPE, LOG2_FLOOR_SHAPE, MAX_SHAPE,
MIN_SHAPE, DIV_CEIL_SHAPE, and ASSERT_EQUAL_SHAPE.
Tighten shape-op validation to better match the TOSA spec. DIM now
validates supported dtypes and rejects non-positive dimensions, and
EXP2_SHAPE enforces MAX_LOG2_SIZE including the 8k-level bound.
Make ASSERT_EQUAL_SHAPE use ShapeEnv bounds to reject provably
mismatched symbolic dimensions without relying on SymBool truthiness.
Add regression coverage for invalid CONCAT_SHAPE inputs, DIM dtype and
zero-dimension failures, EXP2_SHAPE bound checks, disjoint symbolic
ASSERT_EQUAL_SHAPE mismatches, CONST_SHAPE on non-shape specs, and
bounded-symbolic SLICE_SHAPE behavior.
cc @digantdesai @freddan80 @per @zingo @mansnils @Sebastian-Larsson
@robell @rascani
Signed-off-by: Oscar Andersson <oscar.andersson@arm.com>1 parent 91be26d commit 9400da1
2 files changed
Lines changed: 825 additions & 89 deletions
0 commit comments