From 28aa150d3b966d7e057fcae30df647261ee4862f Mon Sep 17 00:00:00 2001 From: wangxn12138 Date: Mon, 13 Mar 2023 06:22:16 +0000 Subject: [PATCH] fix --- paddle/phi/kernels/cpu/index_select_grad_kernel.cc | 1 + python/paddle/tensor/search.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/cpu/index_select_grad_kernel.cc b/paddle/phi/kernels/cpu/index_select_grad_kernel.cc index 9dd50e7df8f06..cf8176687eab2 100644 --- a/paddle/phi/kernels/cpu/index_select_grad_kernel.cc +++ b/paddle/phi/kernels/cpu/index_select_grad_kernel.cc @@ -59,5 +59,6 @@ PD_REGISTER_KERNEL(index_select_grad, phi::IndexSelectGradKernel, float, double, + phi::dtype::bfloat16, int, int64_t) {} diff --git a/python/paddle/tensor/search.py b/python/paddle/tensor/search.py index 5a740245bb1fe..cc1bafb8300d4 100755 --- a/python/paddle/tensor/search.py +++ b/python/paddle/tensor/search.py @@ -350,7 +350,7 @@ def index_select(x, index, axis=0, name=None): check_variable_and_dtype( x, 'x', - ['bfloat16', 'float16', 'float32', 'float64', 'int32', 'int64'], + ['uint16', 'float16', 'float32', 'float64', 'int32', 'int64'], 'paddle.tensor.search.index_select', ) check_variable_and_dtype(