Skip to content

Commit e977f0f

Browse files
author
Zonglin Peng
committed
Update base for Update on "[Jarvis][Nightly] address error jarvis-nightly-operators-test-aten-permute-copy-out"
https://docs.google.com/spreadsheets/d/12DsKcvPcGgxnZ8shgn6j8PmoOQUfy5GgUg974g1iO18/edit?gid=0#gid=0 Differential Revision: [D85364547](https://our.internmc.facebook.com/intern/diff/D85364547/) [ghstack-poisoned]
1 parent 961a187 commit e977f0f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ def random_size_constraint(deps: object, r: int, d: int) -> int:
347347
if index == 1: # Only apply zero-prevention to divisor
348348
tensor_constraints.extend(
349349
[
350-
cp.Value.Ne(lambda deps, dtype, struct: 0), # Prevent division by zero
350+
cp.Value.Ne(
351+
lambda deps, dtype, struct: 0
352+
), # Prevent division by zero
351353
cp.Value.Le(lambda deps, dtype, struct: 2**3),
352354
cp.Size.Le(lambda deps, r, d: 2**3),
353355
cp.Rank.Le(lambda deps: 2**2),
@@ -382,7 +384,9 @@ def random_size_constraint(deps: object, r: int, d: int) -> int:
382384
cp.Dtype.In(lambda deps: [torch.int64, torch.int32, torch.float32]),
383385
cp.Value.Ge(lambda deps, dtype, struct: -(2**4)),
384386
cp.Value.Le(lambda deps, dtype, struct: 2**4),
385-
cp.Value.Ne(lambda deps, dtype, struct: 0), # Prevent division by zero
387+
cp.Value.Ne(
388+
lambda deps, dtype, struct: 0
389+
), # Prevent division by zero
386390
cp.Rank.Ge(lambda deps: 1),
387391
cp.Rank.Eq(lambda deps: deps[0].dim()),
388392
cp.Size.Eq(lambda deps, r, d: fn.safe_size(deps[0], d)),

0 commit comments

Comments
 (0)