Skip to content

v0.7.0

Compare
Choose a tag to compare
@dfalbel dfalbel released this 18 Feb 11:41

Breaking changes

  • torch_sort and Tensor$sort now return 1-indexed results. (#709, @mohamed-180)
  • Support for LibTorch 1.10.2. See also release notes for the PyTorch v1.10. (#758, #763, #775, @hsbadr).
  • Changed default dim from 1 to 2 in nnf_cosine_similarity. (#769)
  • The default value for arguments of various functions have changed. A bug in the code generation was truncating the default values specially if they were float values that needed more than 6 digit precision. (#770)

New features

  • jit_save_for_mobile allows to save a traced model in bytecode form, to be loaded by a LiteModuleLoader. (#713)
  • Exported is_torch_tensor to check wether an object is a tensor or not. (#730, @rdinnager)
  • Adds cuda_get_device_properties(device) that allows one to query device capability and other properties. (#734, @rdinnager)
  • Implemented call_torch_function() to allow calling potentially unexported torch core functions. (#743, @rdinnager)
  • Now when installing torch all of LibTorch and Lantern headers will be installed within the inst directory. This will allow for packages extending torch to bind directly to its C++ library. (#718)
  • dataset_subset will use the .getbatch method of the wrapped dataset if one is available. (#742, @egillax)
  • Added nn_flatten and nn_unflatten modules. (#773)
  • Added cuda_memory_stats() and cuda_memory_summary() to verify the amount of memory torch is using from the GPU. (#774)
  • Added backends_cudnn_version() to query the CuDNN version found by torch. (#774)

Bug fixes

  • Fixed a bug in .validate_sample for the Distribution class that would incorrectly check for tensors. (#739, @hsbadr)
  • Fixed memory leak when applying custom autograd_functions. (#750)
  • Fixed a bug that caused autograd_grad to deadlock when used with custom autograd functions. (#771)
  • Fixed a bug in torch_max and torch_min that would fail with length=2 Tensors. (#772)

Documentation

  • Improved the 'Loading data' vignette and datasets documentation. (#780, @jnolis)

Internal

  • Refactored the internal Lantern types and Rcpp types and made clearer which are the exported types that can be used in the C++ extensions. (#718)
  • Simplified concurrency related constructs in autograd. (#755, @yitao-li)
  • R and C++ code cleanup, styling, and formatting. (#753, @hsbadr)
  • Dataloaders are slightly faster with a new transpose function. (#783)
  • torch_tensor is now a C++ only function slighly increasing performance in a few situations. (#784)