MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / our_method

Function our_method

benchmarking/hbm-access.py:7–15  ·  view source on GitHub ↗
(vocab_size: int, hidden_size: int, n_hidden_states: int)

Source from the content-addressed store, hash-verified

5
6
7def our_method(vocab_size: int, hidden_size: int, n_hidden_states: int):
8 m = vocab_size
9 n = n_hidden_states
10 k = hidden_size
11 # theory: fused matmul + reduction
12 # we write only bsz results back to HBM
13 reads = m * k + n * k
14 writes = n
15 return reads, writes
16
17
18def naive_method(vocab_size: int, hidden_size: int, n_hidden_states: int):

Callers 1

hbm-access.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected