MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / wrap

Function wrap

monai/networks/trt_compiler.py:657–662  ·  view source on GitHub ↗
(model, path)

Source from the content-addressed store, hash-verified

655 args["timestamp"] = timestamp
656
657 def wrap(model, path):
658 if not hasattr(model, "_trt_compiler"):
659 model.orig_forward = model.forward
660 wrapper = TrtCompiler(model, path + ".plan", logger=logger, **args)
661 model._trt_compiler = wrapper
662 model.forward = MethodType(trt_forward, model)
663
664 def find_sub(parent, submodule):
665 idx = submodule.find(".")

Callers 1

trt_compileFunction · 0.85

Calls 1

TrtCompilerClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…