A bit delayed, but - we have quite a few commits in the 1.11 release and some things that are interesting for people that develop within PyTorch.
You can find below a curated list of these changes:
Developers
Python API
- OpInfo improvements:
- More operators now have OpInfo tests:
- Added
OpInfo
fornn.functional.batch_norm
(#63218), - Added
OpInfo
fortorch.argsort
(#65454) - Added
OpInfo
fortorch.repeat_interleave
(#65455) - Added
OpInfo
for2d fft functions
(#66128) - Added
Opinfo
’s foravg_pooling
(#64214) - Added
OpInfo
fortorch.bucketize
(#65821) - Added
OpInfo
’s forisfinite
,isinf
,isposinf
,isneginf
,isnan
,isreal
(#66400) - Added
OpInfo
fortorch.nn.functional.pairwise_distance
(#65460) - Added
OpInfo
fortorch.nn.pixel_shuffle
(#65467) - Added
OpInfo
fortorch.nn.pixel_unshuffle
(#65468) - Added
OpInfo
fortorch.bincount
(#65796) - Added
OpInfo
fornorm
ops (#67442, #68526) - Added
OpInfo
fortorch.nn.functional.gaussian_nll_loss
(#67356) - Added
OpInfo
fornn.functional.hinge_embedding_loss
(#67381) - Added
OpInfo
fornn.functional.gaussian_nll_loss
(#67376) - Added
OpInfo
fornn.functional.poisson_nll_loss
(#67371) - Added
OpInfo
fornn.functional.ctc_loss
(#67464) - Added
OpInfo
fornn.functional.cosine_embedding_loss
(#67465) - Added
OpInfo
foradaptive_max_pool
(#67405) - Added
OpInfo
forlogical_or
,logical_and
,logical_xor
(#67178) - Added
OpInfo
fortorch.allclose
(#68023) - Added
OpInfo
fornn.functional.cross_entropy
(#63547) - Added
OpInfo
fortorch.nn.bilinear
andtorch.nn.glu
(#67478) - Added
OpInfo
fortorch.histc
(#67452) - Added
OpInfos
forstft, istft, fftshift, ifftshift
(#68198) - Added
OpInfos
forparcel Elementwise Binary II
(#68085) - Added
OpInfo
fortorch.linalg.tensorsolve
(#68810) - Added
OpInfo
fortorch.nn.functional.kl_div
(#65469) - Added
OpInfo
fortorch.diagflat
(#65680) - Added
OpInfo
s for some Tensor dtype conversion methods (#64282) - Added
OpInfo
for*_like
functions (#65941) - Added
OpInfo
fortorch.unique
andtorch.unique_consecutive
(#67529) - Added
OpInfo
fornew_
functions and some_like
functions (#67357) - Added
OpInfo
fortorch.nonzero
(#67459) - Added
OpInfos
fortorch.atleast_
{1d, 2d, 3d} (#67355) - Added
OpInfo
forembedding_bag
(#67252) - Added
OpInfos
forcombinations
,cartesian_prod
,sum_to_size
,ldexp
, andas_stride
d (#68853) - Added
OpInfos
for miscnn.functional
operators (#68922) - Added
OpInfo
tests for(svd|pca)_lowrank
(#69107) - Added
OpInfo
fornn.functional.dropout2d
, revise sample inputs fordropout
(#67891) - Added
OpInfos
fornormal
,bernoulli
,multinomial
(#66358) - Added
OpInfos
forflatten
,column_stack
(#69237)
- Added
- Other improvements to
OpInfo
testing:- Added inplace_variant for resize_
OpInfo
(#66135) - Added reference vs. noncontiguous
OpInfo
test (#67434) - Split channels_last test cases for tensor conversion
OpInfos
(#67368) - Remove
OpInfo
non-contig inputs (#67677) - Improve
OpInfo
test for norm ops: make inputs independent - [opinfo] use dtypes instead of
dtypesIfCPU
(#68732) - Fix for python 3.10 for gradient
Opinfo
(#68113) -
OpInfo
: Convert moresample_input_funcs
to generators (#69976) - Updated
poisson_nll_loss
Opinfo
samples (#70300) - Removed unnecessary skips in rsub
OpInfo
(#69973) - Merged index_{add,fill,copy,select}
OpInfo
sampling (#68184) - Labeled more elementwise binary operators correctly as
BinaryUfuncInfos
(#71622) - Deactivated the tracking of gradients in sampling functions within
OpInfos
(#68522) - Removed special FX
OpInfo
list (#67520)
- Added inplace_variant for resize_
- More operators now have OpInfo tests:
- More informative messages for None types comparisons (#69802)
- Killed the
test_torch.py
mixin and created test_scatter_gather_ops (#71691) - Relaxes tolerance on ROCm
test_noncontiguous_samples_matmul
(#67593) - Added support for automated error and warning testing (#67354)
- Skip forward-over-reverse gradgrad check for pinv singular on CUDA (#70123)
- Made meta tensor data access error message for expressive in
assert_close
(#68802) - Removed skips from determinant tests (#70034)
- Refactored repetitions into
TorchVersion._cmp_wrapper
(#71344) - Expect
test_fn_fwgrad_bwgrad
to fail because forward AD is not implemented (#71944) - Some python tensor subclass improvements:
- Added Tensor._make_wrapper_subclass (#65340)
- getitem: Ensure Tensor subclasses are not treated as tuples (#67202)
- Fixed
_make_wrapper_subclass
's storage_offset handling (#68268) - Make empty **and ** _like factory functions respect tensor subclasses (#65677)
- Make new_empty/new_ones/new_zeros/new_full respect subclass (#65169)
- Ensure that “None” tensors in python map to “undefined” tensors in C++ (#67793)
- Rationalized API exports in torch_python (#68095)
- Removed
tensor.data
usage from a few places in internals (#65389)
C++ API
- Convolution consolidation:
- Factored backend routing logic out of convolution forward (#67790)
- General convolution_backward function (#69044, #70112, #71489, #71490, #71491, #69584, #67283, #70661)
- Removed finput, fgrad_input, columns, and ones from slow{2,3}d and slow{2,3}d_transpose signatures (#68897, #68898, #68899)
- Removed backward ops for: cuDNN convolution, cuDNN transposed convolution, deprecated cuDNN convolution, miopen convolution, miopen convolution, miopen transposed convolution, miopen depthwise convolution, slow dilated 2d convolution, slow 2d transposed convolution, slow 3d convolution, slow dilated 3d convolution, mkldnn convolution, low 3d transposed convolution, 2d depthwise convolution, 3d depthwise convolution, NNPACK spatial convolution (#69901, #69902, #71128, #69987, #69987, #70063, #70064, #70067, #70333, #69978, #70068, #70467, #69933, #70461,#69902, #70462, #70305)
- Removed TH/THC logic (#68127, #68556, #69040, #69041, #65942, #69929, #67940)
- Added tanh_backward to AT symbols (#70071)
- Improved documentation of comparison internals (#68977)
- Added isUndefined to ExclusivelyOwnedTraits debug msg (#70638)
- Removed buggy ExclusivelyOwnedTraits> (#70647)
- Generated aten_interned_strings.h automatically (#69407)
- Empty_strided: Factor out generic implementation (#70614)
- Empty_meta: Add functions that don’t depend on Tensor (#70615)
- Consolidated the overloads of TensorImpl::shallow_copy_and_detach (#68953)
- Improved storage assertion of Tensor’s enforce_invariants (#70380)
- Fixed aten’s native’s folder docs. (#71395)
- Use of new_empty in dropout (#72078)
- Simplified TensorImpl size check and fix error message (#72070)
- Added output_mask argument to
grid_sampler_2d_backward
(#66068) - Avoided no-op shared_ptr dtor when constructing tuple (#69337)
- slow_conv2d grad_weight: call gemm directly (#65726)
- Made handle_torch_function_no_python_arg_parser public (#66054)
- slow_conv3d: Avoided dispatch in parallel region (#65737)
- slow_conv3d grad_input: Avoided dispatch in parallel region (#65757)
- slow_conv3d: Used at::sum for grad_bias accumulation (#65758)
- TBB: Use static partitioner to match OpenMP scheduling (#65327)
- Move intraop_launch_future from Parallel.h (#64166)
- slow_conv3d grad_weight: call gemm directly (#65759)
- Wextra fix for Tensorshape.cpp (#66320)
- Add InplaceOrView boxed kernel (#63878)
- Used
at::native::is_nonzero
in a few places to skip an unnecessary dispatch trip (#67195) - Added tags for inplace view ops in native_functions.yaml (#65412)
- Fixed C++ BatchNorm pretty_print() with optional momentum (#67335)
- Inserted check for PyObject_IsInstance in THPVariableCheck (#67588)
- Added SiLU backward Aten symbol (#67665)
- Bumped dlpack.h to latest version (#65047)
- Remove dWindowsTorchApiMacro.h in favor of Export.h (#69585)
- Added macro to register CPU kernel for all arch types (#70332)
-
c10::irange
around the codebase instead of for loops (#70326)
Autograd
- Forward AD can be tested in gradcheck and OpInfos without also testing backward AD (#65040)
- Extended OpInfo and gradgradcheck to test forward-over-reverse Hessian-vector products (#69740)
- Extended OpInfo and gradcheck to test batched forward grad (#66294)
- Enabled warning tests for nondeterministic backward functions (#66736)
- Extended autograd functional benchmarking to run vectorized tasks (#67045)
- Disallowed requires_grad=True in OpInfo’s
make_tensor
function for integral inputs (#67149) - Made autograd codegen for differentiable outputs safer to use (#65823)
Build
- Improved disable name match (#71499)
- Made permission errors more human readable when using setup.py (#66492)
torch.nn
- Added testing across
memory_format
types toModuleInfos
(#69317) - Added private
_masked_softmax
function (#69268, #69272, #69924) - Added
native_dropout
(#63937) -
F.interpolate
: Removed JIT FC tweaks forantialias
flag andnearest-exact
mode (#71937) -
F.pad
: Replacedempty()
withnew_empty()
(#68565) -
F.softmax
: Changeddtype
to support TorchScript and MyPy (#68336) -
nn.BatchNorm*d
: Incrementednum_batches_tracked
in place for improved graph safety (#70444) -
nn.Embedding
: Passed arguments of embedding as named arguments (#67574) -
nn.FractionalMaxPool2d
: Fixed to index correct_random_samples
dimension when provided (#70031) -
nn.{GRU, LSTM, RNN}
: Fixed links to docs in comments (#68828) -
nn.Module
: Added private_stateless
API (#61447, #68969) -
nn.modules.utils.{_single,_pair,_triple,_quadruple}
: Populated__name__
(#70459) -
nn.Parameter
: Usedtorch.empty()
instead oftorch.tensor()
(#66486) -
optim
: UpdatedCODEOWNERS
(#65773) -
optim.Optimizer
: Integratedmulti_tensor
zero_grad
into base class (#69936) - Refactored cuDNN convolution memory format and conv-bias-relu code (#65594)
- Testing
- Set cuDNN deterministic flag for
test_conv_double_backward_cuda
(#69941) - Increased tolerance for
test_adadelta
(#69919) - Set test owner for nn tests (#66850)
- Changed
test_conv_large
parameter initialization (#71521) - Obliviated
ALL_TENSORTYPES
andALL_TENSORTYPES2
(#71153) - Removed repeat test for types in
test_nn.py
(#70872) - Tweaked
rel_tol
fortest_adadelta
(#71880) - Added no-input-grad-needed cases to
test_grid_sample
(#66071) - Added OpInfo entries for
nn.functional.{conv1d, linear}
(#67747, #65498) - Added host-side memory requirement for
test_softmax_64bit_indexing
(#67922) - Made
@dtypes
mandatory when using@dtypesIf
(#68186) - Added testing for complex non-vanilla SGD (#66261)
- Skipped failing tests in
test_nn.py
if compiled without LAPACK (#70913)
- Set cuDNN deterministic flag for
torch.fx
- Supported type annotations in
operator_support.py
(#65136) - Added algo recorder/replayer to
lower.py
(#68194) - Traced asserts with fx by looking at bytecode (#70960)
- Fixed type checking errors in node.py (#68124)
AMD
- Updated ROCm build to avoid relying on
CUDA_VERSION
orHIP_VERSION
macros (#65610)