Expand description
libtorch installation detection and .arch metadata parsing.
Structs§
- Libtorch
Info - Metadata about an installed libtorch variant (from
.archfile).
Functions§
- active_
variant - This box’s active libtorch as
(variant directory, variant label), anchored onroot(a project root, or the global one). - is_
valid_ variant - Check whether a libtorch variant directory looks valid (has lib/).
- ld_
library_ path_ lines - The
exportlines a native-build recipe prints for a variant’s vendor, in order. - ld_
library_ path_ value LD_LIBRARY_PATHVALUE for running againstlibtorch_lib, in the order the loader must see it. The sibling ofld_library_path_lines, which prints the same ordering as a shell recipe; this one is for setting on a child process.- list_
variants - List all installed libtorch variants under
<root>/libtorch/. - local_
rocm_ lib_ dir - The system ROCm runtime’s library directory on THIS box, for
ld_library_path_value’s local callers. - 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. - unmet_
loader_ requirements - Unmet dynamic-linker requirements of a libtorch variant on THIS host, as the loader itself reports them.
- variant_
feature - The cargo feature a variant needs, or
""for a CPU-only variant. - variant_
vendor - Which GPU stack a libtorch variant path targets, from its basename.