MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / is_trt_wrapper

Method is_trt_wrapper

tensorrt_llm/functional.py:575–584  ·  view source on GitHub ↗

Check if there is a trt.ITensor member inside, which is required for graph rewriter. In order to differentiate usages, it may be necessary to have an inheritance hierarchy.

(self)

Source from the content-addressed store, hash-verified

573 flayer and flayer.replace_input_with(self, new_tensor)
574
575 def is_trt_wrapper(self):
576 '''
577 Check if there is a trt.ITensor member inside, which is required for
578 graph rewriter. In order to differentiate usages, it may be necessary
579 to have an inheritance hierarchy.
580 '''
581 if hasattr(self, 'trt_tensor'):
582 return True
583 else:
584 return False
585
586 def __hash__(self):
587 if self.is_trt_wrapper():

Callers 3

__hash__Method · 0.95
buildMethod · 0.80
_get_network_hashMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected