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

Method flatten

tensorrt_llm/functional.py:414–418  ·  view source on GitHub ↗

See functional.flatten.

(self, start_dim=0, end_dim=-1)

Source from the content-addressed store, hash-verified

412 return view(self, shape, zero_is_placeholder)
413
414 def flatten(self, start_dim=0, end_dim=-1):
415 '''
416 See functional.flatten.
417 '''
418 return flatten(self, start_dim, end_dim)
419
420 def permute(self, dims):
421 '''

Callers 15

test_flatten_1Method · 0.95
test_flatten_2Method · 0.95
test_flatten_3Method · 0.95
test_flatten_4Method · 0.95
test_flatten_5Method · 0.95
test_flatten_6Method · 0.95
compaction_torchFunction · 0.80
swizzle_dataMethod · 0.80
_unpack_bitsFunction · 0.80
swizzle_dataMethod · 0.80
format_tensorsFunction · 0.80
copy_to_cache_pagesFunction · 0.80

Calls 1

flattenFunction · 0.85

Tested by 15

test_flatten_1Method · 0.76
test_flatten_2Method · 0.76
test_flatten_3Method · 0.76
test_flatten_4Method · 0.76
test_flatten_5Method · 0.76
test_flatten_6Method · 0.76
format_tensorsFunction · 0.64
copy_to_cache_pagesFunction · 0.64
test_gpt_attentionMethod · 0.64
allcloseMethod · 0.64