MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / get_tensor_parent

Method get_tensor_parent

tensorrt_llm/network.py:415–420  ·  view source on GitHub ↗

Get the layer that produces this tensor.

(self, tensor)

Source from the content-addressed store, hash-verified

413 yield layer
414
415 def get_tensor_parent(self, tensor) -> Optional["Layer"]:
416 '''
417 Get the layer that produces this tensor.
418 '''
419 state = self._get_graph()
420 return state.tensor_to_producer.get(tensor, None)
421
422 def mark_removed_layer(self, layer: "Layer"):
423 from .graph_rewriting import FLayerInfoMemo

Callers 1

get_parentMethod · 0.80

Calls 2

_get_graphMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected