From 08a464a9f35343ecfb6085678a0ee508d71984fc Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Mon, 18 Oct 2021 21:21:03 -0700 Subject: [PATCH] [PyTorch] Pass c10::optional to Stride ctor by value (#66698) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66698 this type should fit in a register; no need to pass by reference. ghstack-source-id: 140742830 Test Plan: CI Reviewed By: suo Differential Revision: D31693291 fbshipit-source-id: 299fb3d1830a059b59268487c22e030446c3496e --- aten/src/ATen/core/jit_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aten/src/ATen/core/jit_type.h b/aten/src/ATen/core/jit_type.h index 0cf2af63f047f..80c7d86319d75 100644 --- a/aten/src/ATen/core/jit_type.h +++ b/aten/src/ATen/core/jit_type.h @@ -243,7 +243,7 @@ struct TORCH_API Stride { Stride() {} Stride( const c10::optional& stride_index, - const c10::optional& contiguous, + c10::optional contiguous, const c10::optional& stride) : stride_index_(stride_index), contiguous_(contiguous), stride_(stride) {}