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
6. Convert the models of OpenMMLab to backends (if necessary) and inference on backend engine. If you find some incompatible operators when testing, you can try to rewrite the original model for the backend following the [rewriter tutorial](support_new_model.md) or add custom operators.
@@ -209,23 +197,26 @@ Although the backend engines are usually implemented in C/C++, it is convenient
209
197
self.sess.run_with_iobinding(io_binding)
210
198
```
211
199
212
-
4.Add a default initialization method for the new wrapper in `mmdeploy/codebase/base/backend_model.py`
200
+
4.Create a backend manager class which derive from `BaseBackendManager`, implement its `build_wrapper` static method.
213
201
214
202
**Example:**
215
203
216
204
```Python
217
-
@staticmethod
218
-
def_build_wrapper(backend: Backend,
219
-
backend_files: Sequence[str],
220
-
device: str,
221
-
input_names: Optional[Sequence[str]] =None,
222
-
output_names: Optional[Sequence[str]] =None):
223
-
if backend == Backend.ONNXRUNTIME:
224
-
from mmdeploy.backend.onnxruntime import ORTWrapper
0 commit comments