File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
native/python/src/fairseq2n/bindings/type_casters Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ using namespace fairseq2n::detail;
1818struct THPVariable {
1919 PyObject_HEAD
2020 #if TORCH_VERSION_MAJOR < 2 || (TORCH_VERSION_MAJOR == 2 && TORCH_VERSION_MINOR < 10)
21- const at::MaybeOwned<at::Tensor> cdata;
21+ at::MaybeOwned<at::Tensor> cdata;
2222 #else
2323 at::Tensor cdata;
2424 #endif
@@ -69,7 +69,7 @@ type_caster<at::Tensor>::load(handle src, bool)
6969
7070 if (isinstance<at::Tensor>(ptr)) {
7171 #if TORCH_VERSION_MAJOR < 2 || (TORCH_VERSION_MAJOR == 2 && TORCH_VERSION_MINOR < 10)
72- value = const *reinterpret_cast <THPVariable *>(ptr)->cdata ;
72+ value = *reinterpret_cast <THPVariable *>(ptr)->cdata ;
7373 #else
7474 value = reinterpret_cast <THPVariable *>(ptr)->cdata ;
7575 #endif
You can’t perform that action at this time.
0 commit comments