pytorch
c3fc17b4 - Fix bit math (#46837)

Commit
4 years ago
Fix bit math (#46837) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46837 Formerly `static_cast<StreamId>(bits)` and `static_cast<DeviceIndex>(bits)` were and-ed against `ull` types resulting in an integer promotion which later raised a warning in downcasting passes to `Stream` and `Device`. Moving the `&` operation inside the cast results in two `uint64_t` being operated on and then cast to the correct type, eliminating the warning. Test Plan: Standard pre-commit test rig. Reviewed By: malfet Differential Revision: D24481292 fbshipit-source-id: a8bcbde631054c26ca8c98fbed275254dd359dd0
Author
Parents
Loading