From 87c07e0a1ac6c44744af86eb89b686ca66d5fc95 Mon Sep 17 00:00:00 2001 From: "Cui, Yifeng" Date: Thu, 19 Dec 2024 22:23:18 -0800 Subject: [PATCH] Fix cow tensor --- src/ATen/native/xpu/mkl/SpectralOps.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ATen/native/xpu/mkl/SpectralOps.cpp b/src/ATen/native/xpu/mkl/SpectralOps.cpp index c7779d091..0318146fc 100644 --- a/src/ATen/native/xpu/mkl/SpectralOps.cpp +++ b/src/ATen/native/xpu/mkl/SpectralOps.cpp @@ -212,10 +212,10 @@ void _mkl_dft( {(long)(workspaceSizeBytes / sizeof(double))}, input.options().dtype(at::kDouble), c10::nullopt); - desc.set_workspace((double*)workspaceBuf.data_ptr()); + desc.set_workspace((double*)workspaceBuf.mutable_data_ptr()); - auto in_data = (scalar_t*)input.data_ptr(); - auto out_data = (scalar_t*)output.data_ptr(); + auto in_data = (scalar_t*)input.const_data_ptr(); + auto out_data = (scalar_t*)output.mutable_data_ptr(); sycl::event event; if (!inverse) {