get_csrc_dir() -> Pathdetrium.ops.builder
Out-of-tree CUDA extension builder and loader for Detrium Turbo ops. Compiles `_detrium_cuda_ext` into `~/.cache/detrium/ops/<sig_prefix>/` so Detrium works cleanly both in editable checkouts and read-only `site-packages` wheels.
compute_build_signature(csrc_dir: Optional[Path]=None) -> Dict[str, str]Compute a deterministic source + ABI signature for `_detrium_cuda_ext`.
| 名称 | 类型 | 默认值 |
|---|---|---|
csrc_dir | Optional[Path] | None |
get_versioned_build_dir(csrc_dir: Optional[Path]=None) -> PathReturn the versioned out-of-tree cache directory for the current source+ABI signature.
| 名称 | 类型 | 默认值 |
|---|---|---|
csrc_dir | Optional[Path] | None |
find_built_binaries(build_dir: Optional[Path]=None) -> Tuple[Path, ...]| 名称 | 类型 | 默认值 |
|---|---|---|
build_dir | Optional[Path] | None |
is_binary_up_to_date(csrc_dir: Optional[Path]=None) -> bool| 名称 | 类型 | 默认值 |
|---|---|---|
csrc_dir | Optional[Path] | None |
load_cached_extension(csrc_dir: Optional[Path]=None) -> Optional[object]Load an already-compiled `_detrium_cuda_ext` shared library from the out-of-tree cache.
| 名称 | 类型 | 默认值 |
|---|---|---|
csrc_dir | Optional[Path] | None |
ensure_cuda_toolchain_env() -> NoneAuto-discover `nvcc` / `CUDA_HOME` matching PyTorch's CUDA major version when unset.
build_extension_out_of_tree(verbose: bool=True) -> Optional[object]Compile `_detrium_cuda_ext` into `~/.cache/detrium/ops/<sig>/` and return the loaded module.
| 名称 | 类型 | 默认值 |
|---|---|---|
verbose | bool | True |