Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FlashSampling/FlashSampling
/ next_power_of_2
Function
next_power_of_2
src/fused_mm_sampling/qitra.py:23–24 ·
view source on GitHub ↗
(n: int)
Source
from the content-addressed store, hash-verified
21
22
23
def
next_power_of_2(n: int) -> int:
24
return
1 << math.ceil(math.log2(max(n, 1)))
25
26
27
def
num_compute_units(device_index: int | None = None) -> int:
Callers
1
apply_top_k_top_p_triton
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected