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

Class SimpleSampler

src/fused_mm_sampling/core.py:653–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651 triton.set_allocator(alloc_on_cuda)
652
653
654def alloc_on_cuda(size: int, alignment: int, stream: int | None):
655 return torch.empty(size, device="cuda", dtype=torch.int8)
656
657
658class Sampler(Protocol):
659 def prepare(self) -> "Sampler":
660 raise NotImplementedError()
661
662 def sample(self, **kwargs) -> torch.Tensor:
663 raise NotImplementedError()

Callers 1

get_samplerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected