mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-03 22:34:43 +08:00
Add Primitive::name and remove Primitive::print (#2365)
This commit is contained in:
@@ -514,7 +514,7 @@ void init_linalg(nb::module_& parent_module) {
|
||||
)pbdoc");
|
||||
m.def(
|
||||
"eigh",
|
||||
[](const mx::array& a, const std::string UPLO, mx::StreamOrDevice s) {
|
||||
[](const mx::array& a, const std::string& UPLO, mx::StreamOrDevice s) {
|
||||
auto result = mx::linalg::eigh(a, UPLO, s);
|
||||
return nb::make_tuple(result.first, result.second);
|
||||
},
|
||||
|
@@ -14,7 +14,7 @@ namespace mx = mlx::core;
|
||||
namespace nb = nanobind;
|
||||
using namespace nb::literals;
|
||||
|
||||
bool DEPRECATE(const std::string& old_fn, const std::string new_fn) {
|
||||
bool DEPRECATE(const char* old_fn, const char* new_fn) {
|
||||
std::cerr << old_fn << " is deprecated and will be removed in a future "
|
||||
<< "version. Use " << new_fn << " instead." << std::endl;
|
||||
return true;
|
||||
|
@@ -3076,7 +3076,7 @@ void init_ops(nb::module_& m) {
|
||||
std::tuple<int>,
|
||||
std::pair<int, int>,
|
||||
std::vector<std::pair<int, int>>>& pad_width,
|
||||
const std::string mode,
|
||||
const std::string& mode,
|
||||
const ScalarOrArray& constant_value,
|
||||
mx::StreamOrDevice s) {
|
||||
if (auto pv = std::get_if<int>(&pad_width); pv) {
|
||||
|
Reference in New Issue
Block a user