未验证 提交 f3206b09 编写于 作者: N niuliling123 提交者: GitHub

Revert "Fix argsort in XPU black list for XPU KP (#45975)" (#46064)

上级 416e0de7
...@@ -210,6 +210,7 @@ PreparedOp PrepareImpl( ...@@ -210,6 +210,7 @@ PreparedOp PrepareImpl(
kernel_signature = *default_kernel_signature; kernel_signature = *default_kernel_signature;
} }
} }
if (has_phi_kernel) { if (has_phi_kernel) {
VLOG(6) << kernel_signature; VLOG(6) << kernel_signature;
phi_kernel_name = kernel_signature.name; phi_kernel_name = kernel_signature.name;
...@@ -217,13 +218,10 @@ PreparedOp PrepareImpl( ...@@ -217,13 +218,10 @@ PreparedOp PrepareImpl(
// But the default library_type is Plain, so we need to modify the // But the default library_type is Plain, so we need to modify the
// library_type here, otherwise it can't work. // library_type here, otherwise it can't work.
#ifdef PADDLE_WITH_XPU_KP #ifdef PADDLE_WITH_XPU_KP
bool is_kp_support = false;
if (paddle::platform::is_xpu_place(expected_kernel_key.place_)) { if (paddle::platform::is_xpu_place(expected_kernel_key.place_)) {
bool use_xpu_kp_kernel_rt = bool use_xpu_kp_kernel_rt =
FLAGS_run_kp_kernel && FLAGS_run_kp_kernel && paddle::platform::is_xpu_kp_support_op(
paddle::platform::is_xpu_kp_support_op(op.Type(), op.Type(), expected_kernel_key);
expected_kernel_key) &&
(!paddle::platform::is_in_xpu_black_list(op.Type()));
bool use_xpu_kp_kernel_debug = bool use_xpu_kp_kernel_debug =
paddle::platform::is_in_xpu_kpwhite_list(op.Type()); paddle::platform::is_in_xpu_kpwhite_list(op.Type());
if (use_xpu_kp_kernel_rt) { if (use_xpu_kp_kernel_rt) {
...@@ -234,7 +232,6 @@ PreparedOp PrepareImpl( ...@@ -234,7 +232,6 @@ PreparedOp PrepareImpl(
} }
bool is_xpu_kp_support = bool is_xpu_kp_support =
(use_xpu_kp_kernel_rt || use_xpu_kp_kernel_debug); (use_xpu_kp_kernel_rt || use_xpu_kp_kernel_debug);
is_kp_support = is_xpu_kp_support;
if (is_xpu_kp_support) { if (is_xpu_kp_support) {
auto expected_kernel_key_library_type = auto expected_kernel_key_library_type =
expected_kernel_key.library_type_; expected_kernel_key.library_type_;
...@@ -264,9 +261,6 @@ PreparedOp PrepareImpl( ...@@ -264,9 +261,6 @@ PreparedOp PrepareImpl(
if (phi_kernel.IsValid() if (phi_kernel.IsValid()
#if defined(PADDLE_WITH_XPU) && !defined(PADDLE_WITH_XPU_KP) #if defined(PADDLE_WITH_XPU) && !defined(PADDLE_WITH_XPU_KP)
&& !is_xpu_unsupport && !is_xpu_unsupport
#endif
#if defined(PADDLE_WITH_XPU_KP)
&& is_kp_support
#endif #endif
) { ) {
VLOG(6) << "Dynamic mode PrepareImpl - kernel name: " << phi_kernel_name VLOG(6) << "Dynamic mode PrepareImpl - kernel name: " << phi_kernel_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册