mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Remove unnecessary expect_true in split_with_sizes (#133439)
Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/133439 Approved by: https://github.com/albanD
This commit is contained in:
parent
c7ca89a11a
commit
bdfc1d3987
1 changed files with 0 additions and 4 deletions
|
|
@ -1414,13 +1414,9 @@ def split_with_sizes(
|
|||
start_idx = 0
|
||||
|
||||
# Avoid importing sympy at a module level
|
||||
from torch.fx.experimental.symbolic_shapes import expect_true
|
||||
|
||||
for i in range(num_splits):
|
||||
length = split_sizes[i]
|
||||
# We know this is true thanks to the sum, but this assertion helps
|
||||
# out our internal reasoning
|
||||
expect_true(start_idx + length <= self.shape[dim])
|
||||
splits.append(self.narrow(dim, start_idx, length))
|
||||
start_idx += length
|
||||
return splits
|
||||
|
|
|
|||
Loading…
Reference in a new issue