mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Symintify transpose_ (#149057)
Fixes https://github.com/pytorch/pytorch/issues/148702 Pull Request resolved: https://github.com/pytorch/pytorch/pull/149057 Approved by: https://github.com/yushangdi
This commit is contained in:
parent
08a644a4c4
commit
8d7c430e84
|
|
@ -3610,11 +3610,11 @@ Tensor& transpose_(Tensor& self, int64_t dim0, int64_t dim1) {
|
|||
return at::_mkldnn_transpose_(self, dim0, dim1);
|
||||
}
|
||||
|
||||
DimVector sizes(self.sizes().begin(), self.sizes().end());
|
||||
DimVector strides(self.strides().begin(), self.strides().end());
|
||||
std::swap(strides[dim0], strides[dim1]);
|
||||
SymDimVector sizes(self.sym_sizes().begin(), self.sym_sizes().end());
|
||||
std::swap(sizes[dim0], sizes[dim1]);
|
||||
self.as_strided_(sizes, strides);
|
||||
SymDimVector strides(self.sym_strides().begin(), self.sym_strides().end());
|
||||
std::swap(strides[dim0], strides[dim1]);
|
||||
auto result = self.as_strided__symint(std::move(sizes), std::move(strides));
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6557,7 +6557,6 @@ symbolic_aot_autograd_failures = {
|
|||
"linalg.householder_product",
|
||||
decorator=unittest.skipIf(IS_MACOS and IS_X86, "flaky"),
|
||||
),
|
||||
xfail("stft", ""), # Cannot call sizes() on tensor with symbolic sizes/strides
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user