← Back to events
ActiveAIRelease

trunk/5038832e12e07068a5231c3e9e6c9700fcc98ca8: [MPS] fix rand and uniform_ upper-bound rounding (#197081)

What happened

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]…

Summary assembled by rule from the sources below

Why it's spreading

Sources