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

Function _get_module

src/fused_mm_sampling/cuda_impl.py:18–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def _get_module():
19 global _module
20 if _module is not None:
21 return _module
22 _module = load(
23 name="fmms_cuda",
24 sources=[str(_CSRC_DIR / "fmms_kernel.cu")],
25 extra_cuda_cflags=[
26 "-O3",
27 "--use_fast_math",
28 f"-gencode=arch=compute_{_sm_version()},code=sm_{_sm_version()}",
29 ],
30 verbose=os.environ.get("FMMS_CUDA_VERBOSE", "") == "1",
31 )
32 return _module
33
34
35def _sm_version() -> str:

Callers 1

fused_mm_sample_cudaFunction · 0.85

Calls 1

_sm_versionFunction · 0.85

Tested by

no test coverage detected