Miscellaneous¶
-
double metatomic_torch::unit_conversion_factor(const std::string &quantity, const std::string &from_unit, const std::string &to_unit)¶
Get the multiplicative conversion factor to use to convert from unit
from
to unitto
. Both should be units for the given physicalquantity
.
-
std::string metatomic_torch::pick_device(std::vector<std::string> model_devices, torch::optional<std::string> desired_device = torch::nullopt)¶
Select the best device according to the list of
model_devices
from a model, the user-provideddesired_device
and what’s available on the current machine.