You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix lerp overload ambiguity with std::lerp under C++20 (#1985)
PyTorch commit ad56ff73b751 ("[2/12] Upgrade cpp_extension and
cpp_builder to C++20", pytorch/pytorch#176659) changed the default
C++ standard from C++17 to C++20 for extensions built via
torch.utils.cpp_extension. Under C++20, std::lerp from <cmath> is
visible alongside the custom lerp(float,float,float) defined in this
file. When the third argument is c10::BFloat16 (implicitly convertible
to float), the compiler finds two equally-valid overload candidates
and fails with "more than one instance of overloaded function matches".
Rename the custom lerp to _lerp to eliminate the ambiguity.
Signed-off-by: Xiao Wang <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
0 commit comments