nncf
nncf copied to clipboard
Add a workaround for torch<1.11.0 bug with tensor indexing
Changes
For torch < 1.11.0, additionally wrap tensor indices for torch.Tensor in a tuple so that indexing a tensor using TracedTensor indices has correct behaviour.
Reason for changes
Fixes incorrect behaviour of NNCF for clients with torch < 1.11.0.
Related tickets
82065
Tests
TBA
upstream patch was applied torch==1.11.0.
For torch<1.11.0, this PR patches __getitem__ operator as same as https://github.com/pytorch/pytorch/issues/52721#issuecomment-804773009.
@vshampor, is it actual since we bumped torch version to 1.12?
@vshampor, is it actual since we bumped torch version to 1.12?
Not really.