Skip to content

Commit de1d149

Browse files
author
Zonglin Peng
committed
jarvis-nightly-operators-test-aten-constant-pad-nd-out
Pull Request resolved: #15499 ghstack-source-id: 320280756 @exported-using-ghexport Differential Revision: [D85364553](https://our.internmc.facebook.com/intern/diff/D85364553/)
1 parent 564ac93 commit de1d149

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,15 @@ def random_size_constraint(deps: object, r: int, d: int) -> int:
351351
]
352352
)
353353
case "constant_pad_nd.default":
354-
tensor_constraints.extend(
355-
[
356-
cp.Dtype.In(lambda deps: [torch.float32]),
357-
cp.Size.Le(lambda deps, r, d: 2**2),
358-
]
359-
)
354+
tensor_constraints = [
355+
cp.Dtype.In(lambda deps: [torch.float32]),
356+
cp.Value.Ge(lambda deps, dtype, struct: -(2**4)),
357+
cp.Value.Le(lambda deps, dtype, struct: 2**4),
358+
cp.Rank.Ge(lambda deps: 1),
359+
cp.Rank.Le(lambda deps: 2), # Reduced from 3 to 2 (max 2D tensors)
360+
cp.Size.Ge(lambda deps, r, d: 1),
361+
cp.Size.Le(lambda deps, r, d: 3), # Max dimension size of 3
362+
]
360363
case "avg_pool2d.default":
361364
tensor_constraints.extend(
362365
[

0 commit comments

Comments
 (0)