mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Add Primitive::name and remove Primitive::print (#2365)
This commit is contained in:
@@ -354,9 +354,7 @@ struct PrimitiveFactory {
|
||||
|
||||
void save(Writer& os, const std::shared_ptr<Primitive>& p) {
|
||||
serialize(os, p->stream());
|
||||
std::ostringstream pout;
|
||||
p->print(pout);
|
||||
auto name = pout.str();
|
||||
std::string name = p->name();
|
||||
name = name.substr(0, name.find(' '));
|
||||
if (auto it = name_remap.find(name); it != name_remap.end()) {
|
||||
name = it->second;
|
||||
|
||||
Reference in New Issue
Block a user