| 734 | #undef CUSTOM_CASE_TO_PARSE_NON_LIST |
| 735 | |
| 736 | py::list install_custom(const std::string& name, const std::string& path) { |
| 737 | #if MGB_CUSTOM_OP |
| 738 | const auto& ops_in_lib = custom::CustomOpManager::inst()->install(name, path); |
| 739 | py::list ret = py::cast(ops_in_lib); |
| 740 | return ret; |
| 741 | #else |
| 742 | mgb_assert(false, "CustomOp disabled, please build megengine with CustomOp open"); |
| 743 | return py::list{}; |
| 744 | #endif |
| 745 | } |
| 746 | |
| 747 | py::list uninstall_custom(const std::string& name) { |
| 748 | #if MGB_CUSTOM_OP |