diff --git a/frontends/pytorch/csrc/builder/acap_dispatch.cpp b/frontends/pytorch/csrc/builder/acap_dispatch.cpp index ed8fb4485..c3b07624d 100644 --- a/frontends/pytorch/csrc/builder/acap_dispatch.cpp +++ b/frontends/pytorch/csrc/builder/acap_dispatch.cpp @@ -364,7 +364,7 @@ at::Tensor &AcapController::copyUnderKernel(at::Tensor &self, } at::Tensor AcapController::arangeBackendSelectKernel( - at::Scalar end, c10::optional dtype, + const at::Scalar &end, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory) { static c10::OperatorName opName{"aten::arange", ""}; @@ -380,7 +380,7 @@ at::Tensor AcapController::arangeBackendSelectKernel( // built-in handlers dispatch to BackendSelect kernels. auto targetDk = c10::computeDispatchKey(dtype, layout, device); auto opTyped = opHandle->typed dtype, + const at::Scalar &end, c10::optional dtype, c10::optional layout, c10::optional device, c10::optional pin_memory)>(); return opTyped.redispatch(c10::DispatchKeySet({targetDk}), end, dtype, layout, device, diff --git a/frontends/pytorch/csrc/builder/acap_dispatch.h b/frontends/pytorch/csrc/builder/acap_dispatch.h index 37d4a261d..954557bd8 100644 --- a/frontends/pytorch/csrc/builder/acap_dispatch.h +++ b/frontends/pytorch/csrc/builder/acap_dispatch.h @@ -72,11 +72,10 @@ public: bool non_blocking); // Backend select kernel for arange factory function. - static at::Tensor - arangeBackendSelectKernel(at::Scalar end, c10::optional dtype, - c10::optional layout, - c10::optional device, - c10::optional pin_memory); + static at::Tensor arangeBackendSelectKernel( + const at::Scalar &end, c10::optional dtype, + c10::optional layout, c10::optional device, + c10::optional pin_memory); private: /// Builds a kernel call step by step.