MCPcopy
hub / github.com/NVIDIA/TensorRT-LLM / create_plugin

Method create_plugin

tensorrt_llm/python_plugin.py:492–502  ·  view source on GitHub ↗
(self, name, fc, phase)

Source from the content-addressed store, hash-verified

490 super().__init__()
491
492 def create_plugin(self, name, fc, phase):
493 if len(fc) == 1 and fc[0].name == "__plugin_pickle_obj__":
494 data = fc[0].data
495 plugin_dict = pickle.loads(data) # nosec B301
496 plugin = self.plugin_cls.__new__(self.plugin_cls)
497 super(self.plugin_cls, plugin).__init__()
498 plugin.__dict__.update(plugin_dict)
499 else:
500 raise RuntimeError("Expect to be called by TRT")
501 plugin.plugin_phase = phase
502 return plugin
503
504
505def trtllm_plugin(

Callers 15

flash_attention_opFunction · 0.80
gemm_swigluFunction · 0.80
cumsumFunction · 0.80
_lookup_pluginFunction · 0.80
identityFunction · 0.80
create_allreduce_pluginFunction · 0.80
allgatherFunction · 0.80
reduce_scatterFunction · 0.80
sendFunction · 0.80
recvFunction · 0.80
gemm_allreduceFunction · 0.80
bert_attentionFunction · 0.80

Calls 3

__new__Method · 0.45
__init__Method · 0.45
updateMethod · 0.45

Tested by

no test coverage detected