Skip to content

Commit f214120

Browse files
ethansfngfacebook-github-bot
authored andcommitted
Add constraints for split_copy test
Differential Revision: D84104833
1 parent 697078b commit f214120

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,22 @@ def random_size_constraint(deps: object, r: int, d: int) -> int:
253253
cp.Value.Le(lambda deps, dtype, struct: 2),
254254
]
255255
)
256+
case "split_copy.Tensor":
257+
tensor_constraints.extend(
258+
[
259+
cp.Dtype.In(
260+
lambda deps: [
261+
torch.int32,
262+
torch.int64,
263+
torch.float32,
264+
]
265+
),
266+
cp.Value.Ge(lambda deps, dtype, struct: 1),
267+
cp.Value.Le(lambda deps, dtype, struct: 2**3),
268+
cp.Rank.Le(lambda deps: 3),
269+
cp.Size.Le(lambda deps, r, d: 2**2),
270+
]
271+
)
256272
case "constant_pad_nd.default":
257273
tensor_constraints.extend(
258274
[

0 commit comments

Comments
 (0)