From 8aaf6b5fa7628ca2bd73895a59a050322d09c16c Mon Sep 17 00:00:00 2001 From: Yutao Xu Date: Sun, 24 Nov 2024 21:38:31 +0800 Subject: [PATCH] Update Activation.cpp --- src/ATen/native/xpu/Activation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ATen/native/xpu/Activation.cpp b/src/ATen/native/xpu/Activation.cpp index 87cac9c36..447cd9ffe 100644 --- a/src/ATen/native/xpu/Activation.cpp +++ b/src/ATen/native/xpu/Activation.cpp @@ -84,8 +84,8 @@ std::tuple log_sigmoid_forward_out_xpu( } std::tuple log_sigmoid_forward_xpu(const Tensor& input) { - auto result = at::empty_like(input); - auto buffer = at::empty({0}, input.options()); + auto result = at::empty_like(input, at::MemoryFormat::Contiguous); + auto buffer = at::empty_like(input, at::MemoryFormat::Contiguous); log_sigmoid_forward_out_xpu(input, result, buffer); return std::forward_as_tuple(result, buffer); }