viable/strict/1789509051: [MPS] fix rand and uniform_ upper-bound rounding (#197081)
- PyTorch: 1019 events in the last 90 days
- PyTorch: 1008th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1789507485: [ROCm] Re-enable distributed tests with resolved flaky history (#196484)
What happened
Fixes #197079 Mimic CPU, warp samples rounded to the excluded upper bound back to the lower bound. Reason for putting the casts on host side and not on device side is because of Metal compiler bug. Repro: using namespace metal; kernel void repro(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[…
Summary assembled by rule from the sources below