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

Function alloc_on_cuda

src/fused_mm_sampling/core.py:640–641  ·  view source on GitHub ↗
(size: int, alignment: int, stream: int | None)

Source from the content-addressed store, hash-verified

638@triton.jit
639def _gumbel_noise(seed, sample_idx, noise_offsets):
640 # Use the seed as the sample-stream identifier and the offset as the
641 # element identifier. Keeping these two dimensions separate avoids the
642 # collisions caused by combining sample and tile IDs with arbitrary
643 # decimal multipliers.
644 return -tl.log(-tl.log(tl.rand(seed + sample_idx, noise_offsets)))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected