trunk/6d164731740e201b9c3f3c6422b14557160ab006: Fix _maybe_view_chunk_cat view shape for negative gather_dim (#194865)
- PyTorch 近 90 天出现 119 次
- PyTorch 近 90 天第 118 次发版
- 上一次:同一天稍早 · v2.14.0-rc10: [cuDNN] Add guards for cuDNN SDPA decode (#194963)
发生了什么
Fixes #194856 _maybe_view_chunk_cat builds the view target shape with shape[gather_dim + 1:] , which wraps around for gather_dim == -1 ( shape[0:] re-appends the whole shape), so all_gather_single(x, gather_dim=-1, ...) raises RuntimeError: shape '[...]' is invalid for input of size ... whenever the view optimization is eligible. The numel_between guard ( if gather_dim > 1 else 1 ) mis-hands negative dims into the v…
摘要按规则整理自下方来源原文