viable/strict/1787914523: Fix integer overflow in at::divup (#195035)
- PyTorch 近 90 天出现 2343 次
- PyTorch 近 90 天第 2313 次发版
- 上一次:同一天稍早 · trunk/640380d8d3a5a9dc8b6c8753e63a0660939b5ad9
发生了什么
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…
摘要按规则整理自下方来源原文