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

Method n_blocks

triton_kernels/routing.py:85–89  ·  view source on GitHub ↗
(self, n_rows, block_m)

Source from the content-addressed store, hash-verified

83 expected_tokens_per_expt: int = field(default=None)
84
85 def n_blocks(self, n_rows, block_m):
86 if n_rows <= self.n_expts_tot:
87 return n_rows
88 else:
89 return triton.cdiv(max(n_rows - self.n_expts_tot + 1, 0), block_m) + self.n_expts_tot - 1
90
91
92# --------------------------

Callers 3

matmul_ogsFunction · 0.95
compute_grid_sizeFunction · 0.80

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected