fix _slice_meta's shape calculation (#98326)
Fixes #98325.
This PR corrects the output shape calculation used in `_slice_meta` from:
```python
math.floor((end - start) / stride)
```
to
```python
1 + (end - start - 1) // stride
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98326
Approved by: https://github.com/ezyang