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

trunk/60f968a6c73628f8f0d1e0f41c8c650ebc2140df: Fix integer overflow in max_pool1d shape checks (#194112)

发生了什么

torch.max_pool1d segfaults for several out-of-domain integer arguments. There are three separate silent integer overflows in the shape math, and all three have to go for the op to be safe — fixing (1) alone makes (3) newly reachable. 1. div_rtn() floor-divides in int static inline T div_rtn(T x, T y) { - int q = x / y; - int r = x % y; + T q = x / y; + T r = x % y;"> template typename T> static inline T div_rtn (T x…

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

为什么在扩散

来源