MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / __init__

Method __init__

examples/tensorrt/vit/plugin_loader.py:30–40  ·  view source on GitHub ↗
(self, plugin_path)

Source from the content-addressed store, hash-verified

28
29class ViTPluginLoader:
30 def __init__(self, plugin_path) -> None:
31
32 handle = ctypes.CDLL(plugin_path, mode=ctypes.RTLD_GLOBAL)
33 if not handle:
34 raise RuntimeError("Fail to load plugin library: %s" % plugin_path)
35
36 self.logger_ = trt.Logger(trt.Logger.VERBOSE)
37 trt.init_libnvinfer_plugins(self.logger_, "")
38 plg_registry = trt.get_plugin_registry()
39
40 self.plg_creator = plg_registry.get_plugin_creator("CustomVisionTransformerPlugin", "1", "")
41
42 def load_model_config(self, config, args):
43 self.patch_size_ = config.patches.size[0]

Callers

nothing calls this directly

Calls 1

LoggerMethod · 0.45

Tested by

no test coverage detected