PyTorch añade torch::stable::from_file a su ABI estable
El proyecto PyTorch ha incorporado la función torch::stable::from_file a su ABI estable mediante la PR #198263, aprobada por janeyx99. La función devuelve un tensor unidimensional respaldado por un mapa de memoria del fichero, y la necesita torchvision, que hasta ahora usaba una función auxiliar local para decodificar imágenes. Respecto a la firma de ATen, el nombre de fichero pasa de std::string_view a const std::string&. Las pruebas, en la extensión libtorch_agn_2_10, verifican el dtype y que los bytes devueltos coinciden con los del fichero original.
Fuentes
- GitHub pytorch/pytorchpytorch/pytorch: trunk/903d704d38916437fd995fdbc0db031e72de92d9: [Stable-ABI] Add torch::stable::from_file. (#198263)
- GitHub pytorch/pytorchpytorch/pytorch: viable/strict/1792046569: [Stable-ABI] Add torch::stable::from_file. (#198263)
- GitHub pytorch/pytorchpytorch/pytorch: trunk/755182b4f34e5c96d0e35d7503f67b4d66596395: [Stable-ABI] Add torch::stable::add. (#196762)
- GitHub pytorch/pytorchpytorch/pytorch: viable/strict/1792175527: [Stable-ABI] Add torch::stable::add. (#196762)