Fix and improvements to toward 3.13t (#136319)

Small part of https://github.com/pytorch/pytorch/pull/130689
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136319
Approved by: https://github.com/malfet, https://github.com/Skylion007
This commit is contained in:
albanD
2024-09-20 04:22:18 +00:00
committed by PyTorch MergeBot
parent e3ea5429f2
commit cf31724db7
5 changed files with 31 additions and 15 deletions

View File

@ -739,7 +739,7 @@ public:
static mpy::obj<Tensor> create() {
if (!TensorType) {
TensorType = (PyTypeObject*) mpy::import("functorch.dim").attr("Tensor").ptr();
TensorType = (PyTypeObject*) mpy::import("functorch.dim").attr("Tensor").release();
}
return Tensor::alloc(TensorType);
}