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

Method rank

tensorrt_llm/functional.py:492–496  ·  view source on GitHub ↗

Returns the rank (i.e. the number of dimensions) of the tensor.

(self)

Source from the content-addressed store, hash-verified

490 return self.trt_tensor.shape[dim]
491
492 def rank(self):
493 '''
494 Returns the rank (i.e. the number of dimensions) of the tensor.
495 '''
496 return len(self.trt_tensor.shape)
497
498 def ndim(self):
499 '''

Callers 12

ndimMethod · 0.95
test_MpicommFunction · 0.45
expandFunction · 0.45
gatherFunction · 0.45
selectFunction · 0.45
index_selectFunction · 0.45
masked_selectFunction · 0.45
cumsumFunction · 0.45
masked_scatterFunction · 0.45
concatFunction · 0.45
broadcast_helperFunction · 0.45
whereFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_MpicommFunction · 0.36