From ecbca4bdc85846f8f2441884adbcb1d056f838b1 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 28 Oct 2024 22:51:49 -0700 Subject: [PATCH] Update PyTorch THPVariable_Wrap to use const ref --- native/python/src/fairseq2n/bindings/type_casters/torch.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/python/src/fairseq2n/bindings/type_casters/torch.cc b/native/python/src/fairseq2n/bindings/type_casters/torch.cc index af4c2e299..43f24d4e5 100644 --- a/native/python/src/fairseq2n/bindings/type_casters/torch.cc +++ b/native/python/src/fairseq2n/bindings/type_casters/torch.cc @@ -20,7 +20,7 @@ struct THPVariable { extern PyObject *THPVariableClass; -PyObject *THPVariable_Wrap(at::TensorBase var); +PyObject *THPVariable_Wrap(const at::TensorBase& var); // Taken from // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)