Expand description
libtorch installation detection and .arch metadata parsing.
Structs§
- Libtorch
Info - Metadata about an installed libtorch variant (from
.archfile).
Functions§
- arch_
compatible - Check whether a GPU’s compute capability is covered by the libtorch variant’s compiled architectures (from the .arch file).
- is_
valid_ variant - Check whether a libtorch variant directory looks valid (has lib/).
- list_
variants - List all installed libtorch variants under
<root>/libtorch/. - read_
active - Read the active libtorch variant from
<root>/libtorch/.activeand parse its.archmetadata. - read_
active_ from - Read any
.active*pointer file and resolve its content (a relative path likeprecompiled/cu128orbuilds/sm61-sm120) againstlibtorch_rootto produce aLibtorchInfo. - set_
active - Set the active libtorch variant by writing
<root>/libtorch/.active.