This documents the main changes to the tch
crate.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- PyTorch v2.2 support
- PyTorch v2.1 support 803.
- Add a
pyo3-tch
crate for interacting with Python via PyO3 730. - Expose the cuda fuser enabled flag, 728.
- Improved the safetensor error wrapping, 720.
- Support static linking in the build script, 712.
- Make the libtorch download opt-in rather than a default behavior. The libtorch
library download can still be triggered by enabling the
download-libtorch
feature, 707. - Rename the
of_...
conversion functions tofrom_...
so as to be closer to the Rust best practices, 706. This is a breaking change and will require modifying calls such asof_slice
to befrom_slice
instead. - Expose some functions so that Python extensions that operates on PyTorch
tensors can be written with
tch
, 704. - Rework the torch-sys build script making it easier to leverage a Python PyTorch install as a source for libtorch, 703.
- EfficientNet models have been reworked, pre-trained models used
safetensors
weight by default, 679. - None can be used for nullable scalar types, 680.
- Automated conversion of list arguments: all the generated functions that take as input a slice of int or float can now be used directly with int values or fixed length arrays 682.
- Replace the
From<Tensor>
traits with someTryFrom
versions, 683. This is a breaking change, note that also the old version would flatten the tensor if needed to reduce the number of dimensions, this has to be done explicitely with the new version.
- Adapt to C++ PyTorch library (
libtorch
) versionv2.0.0
.
- Update the
half
dependency to version2
, 646.
- Add some helper functions in a utils module to check the available devices and versions.
- Add the
eps
andamsgrad
options to Adam, 600.
- Fix loading of
VarStore
when usingMps
devices, 623. - Use
ureq
instead ofcurl
to reduce compile times, 620. - Fix the handling of dicts in TorchScript, 597.
- Default
vs.load
to use the Python weight format when the file extension is.pt
or.bin
.
- Expose functions for setting manual seeds for CUDA devices, #500.
- Expose functions for triggering manual sync, #500.
- Add some functions to load Python weight files.
- Extending the Kaiming initialization, #573.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.13.0
.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.12.0
.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.11.0
.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.10.0
.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.9.0
.
- Adapt to C++ PyTorch library (
libtorch
) versionv1.8.1
.