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

Method __init__

tensorrt_llm/functional.py:1481–1485  ·  view source on GitHub ↗
(self, condition: Tensor)

Source from the content-addressed store, hash-verified

1479 '''
1480
1481 def __init__(self, condition: Tensor):
1482 self.layer = default_trtnet().add_if_conditional()
1483 if condition.ndim() > 0:
1484 condition = view(condition, [])
1485 self.layer.set_condition(condition.trt_tensor)
1486
1487 def add_input(self, input: Tensor) -> Tensor:
1488 in_node = self.layer.add_input(input.trt_tensor)

Callers

nothing calls this directly

Calls 3

default_trtnetFunction · 0.85
viewFunction · 0.85
ndimMethod · 0.45

Tested by

no test coverage detected