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

Function sample_compiled

src/fused_mm_sampling/core.py:160–166  ·  view source on GitHub ↗
(*args, seed: int | None = None, **kwargs)

Source from the content-addressed store, hash-verified

158greedy_sample_compiled = nvtx.annotate()(torch.compile(greedy_sample, fullgraph=True))
159
160_sample_compiled = torch.compile(sample, fullgraph=True)
161
162
163@nvtx.annotate()
164def sample_compiled(*args, seed: int | None = None, **kwargs):
165 # torch.manual_seed is dynamo-skipped, so seed handling has to live outside
166 # the compiled region. Pass seed=None into the compiled inner; the dead
167 # `if seed is not None` branch in sample() is folded at trace time.
168 if seed is not None:
169 torch.manual_seed(seed)

Callers 1

get_samplerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected