trunk/5038832e12e07068a5231c3e9e6c9700fcc98ca8: [MPS] fix rand and uniform_ upper-bound rounding (#197081)
- PyTorch 近 90 天出现 1034 次
- PyTorch 近 90 天第 1023 次发版
- 上一次:同一天稍早 · trunk/10081c710a4f57cb7bb08b004027a42b28851a35
发生了什么
By adding value == to ? from : value ternary at the end Use volatile to prevent erroneous elimination of static_cast see reproducer below using namespace metal; bfloat volcast(volatile float x) { return static_cast (x); } kernel void repro_bug(device bfloat* out, constant float2& bounds, constant float* samples, uint i [[thread_position_in_grid]]) { bfloat value = bfloat(bounds.x + (bounds.y - bounds.x) * samples[i]…
摘要按规则整理自下方来源原文