From f70f9ec240dbd97c33f42ec6c0ad08b22aeb592b Mon Sep 17 00:00:00 2001 From: yucai Date: Wed, 10 Jul 2024 05:20:13 +0000 Subject: [PATCH] revise --- src/ATen/native/xpu/TensorAdvancedIndexing.cpp | 4 ---- src/ATen/native/xpu/sycl/Indexing.cpp | 12 ------------ yaml/xpu_functions.yaml | 2 -- 3 files changed, 18 deletions(-) diff --git a/src/ATen/native/xpu/TensorAdvancedIndexing.cpp b/src/ATen/native/xpu/TensorAdvancedIndexing.cpp index 3e399763f..651353c5d 100644 --- a/src/ATen/native/xpu/TensorAdvancedIndexing.cpp +++ b/src/ATen/native/xpu/TensorAdvancedIndexing.cpp @@ -342,10 +342,6 @@ Tensor& XPUNativeFunctions::index_fill_( // Handle the case when `self` is 0-dim Tensor self_nonzero_dim = (self.dim() == 0) ? self.unsqueeze(-1) : self; - - dim = maybe_wrap_dim(dim, self.dim()); - TORCH_CHECK(index.dim() <= 1, "Index has to be a vector/scalar"); - index_func_meta_impl(self, self, dim, index, self, "index_fill"); native::xpu::index_fill_kernel(self, dim, index, source, self); return self; } diff --git a/src/ATen/native/xpu/sycl/Indexing.cpp b/src/ATen/native/xpu/sycl/Indexing.cpp index edde8c5a0..7a15097e9 100644 --- a/src/ATen/native/xpu/sycl/Indexing.cpp +++ b/src/ATen/native/xpu/sycl/Indexing.cpp @@ -420,18 +420,6 @@ struct IndexFillScalarFunctor { dst[dst_off] = alpha; } }; -template <> -struct IndexFillScalarFunctor { - void operator()( - bool* dst, - bool* src, - int64_t dst_off, - int64_t src_off, - int64_t idx, - bool alpha) const { - dst[dst_off] = alpha; - } -}; void index_fill_kernel( const Tensor& self, diff --git a/yaml/xpu_functions.yaml b/yaml/xpu_functions.yaml index 8029afd97..e8b8c40a7 100644 --- a/yaml/xpu_functions.yaml +++ b/yaml/xpu_functions.yaml @@ -87,9 +87,7 @@ supported: - index_add_ - index_add - index_fill_.int_Tensor - - index_fill_.int_Scalar - index_fill.int_Tensor - - index_fill.int_Scalar - index_select - index_select.out - gcd