Skip to content

Commit a562bbd

Browse files
Update mllm/backends/ascend/ops/AscendSliceOp.cpp
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 1cb5058 commit a562bbd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mllm/backends/ascend/ops/AscendSliceOp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void AscendSliceOp::forward(const std::vector<Tensor>& inputs, std::vector<Tenso
7373
end = std::max(0, std::min(end, dim_size));
7474

7575
param.offsets.push_back(start);
76-
param.size.push_back(end - start);
76+
param.size.push_back(std::max(0, end - start));
7777
}
7878

7979
atb::Operation* op = nullptr;

0 commit comments

Comments
 (0)