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

viable/strict/1787914523: Fix integer overflow in at::divup (#195035)

发生了什么

at::divup(x, y) computes (x + y - 1) / y . The addition overflows for large x or y , and the result then silently rounds down instead of up — divup(2, INT64_MAX) returns 0 , not 1 . Guarded with c10::add_overflows , falling back to a form that cannot overflow. Every caller today passes loop extents and chunk counts, so for most of them this is latent. One caller does reach it: PoolingParams1D::valid_output_end bound…

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

为什么在扩散

来源