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

Method volume_func

tensorrt_llm/runtime/generation.py:828–829  ·  view source on GitHub ↗
(dims)

Source from the content-addressed store, hash-verified

826 ]), f"Expect all dimensions >=0, got {override_shape}"
827
828 def volume_func(dims):
829 return reduce(lambda x, y: x * y, dims, 1)
830 assert volume_func(override_shape) <= volume_func(torch_shape), \
831 f"Override the shape to be larger than the underlying torch Tensor, got {override_shape}, torch tensor shape {torch_shape}"
832 else:

Callers

nothing calls this directly

Calls 1

reduceFunction · 0.85

Tested by

no test coverage detected