← 返回事件
持续讨论AI发版

trunk/6d164731740e201b9c3f3c6422b14557160ab006: Fix _maybe_view_chunk_cat view shape for negative gather_dim (#194865)

图:PyTorch Releases

发生了什么

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…

摘要按规则整理自下方来源原文

为什么在扩散

来源