Skip to content

Commit 652a625

Browse files
author
Zonglin Peng
committed
[Jarvis][Nightly] address zero division in jarvis-nightly-operators-test-aten-div-out-mode
https://docs.google.com/spreadsheets/d/12DsKcvPcGgxnZ8shgn6j8PmoOQUfy5GgUg974g1iO18/edit?gid=0#gid=0 Differential Revision: [D85364551](https://our.internmc.facebook.com/intern/diff/D85364551/) [ghstack-poisoned]
1 parent 11f752c commit 652a625

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def random_size_constraint(deps: object, r: int, d: int) -> int:
373373
cp.Dtype.In(lambda deps: [torch.int64, torch.int32, torch.float32]),
374374
cp.Value.Ge(lambda deps, dtype, struct: -(2**4)),
375375
cp.Value.Le(lambda deps, dtype, struct: 2**4),
376+
cp.Value.Ne(lambda deps, dtype, struct: 0), # Prevent division by zero
376377
cp.Rank.Ge(lambda deps: 1),
377378
cp.Rank.Eq(lambda deps: deps[0].dim()),
378379
cp.Size.Eq(lambda deps, r, d: fn.safe_size(deps[0], d)),

0 commit comments

Comments
 (0)