Compile float64 functions on CPU (#2311)

This commit is contained in:
Awni Hannun
2025-06-24 10:18:52 -07:00
committed by GitHub
parent 5adf185f86
commit 81bb9a2a9e
4 changed files with 24 additions and 2 deletions

View File

@@ -205,6 +205,8 @@ nb::object to_scalar(mx::array& a) {
return nb::cast(static_cast<float>(a.item<mx::bfloat16_t>()));
case mx::complex64:
return nb::cast(a.item<std::complex<float>>());
case mx::float64:
return nb::cast(a.item<double>());
default:
throw nb::type_error("type cannot be converted to Python scalar.");
}