Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions paddle/fluid/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,7 @@ if(WITH_XPU)
cc_library(
phi_utils
SRCS phi_utils.cc
DEPS lod_tensor
selected_rows_utils
phi
common
var_type_traits
op_info
xpu_op_list)
DEPS lod_tensor selected_rows_utils phi common var_type_traits op_info)
else()
cc_library(
phi_utils
Expand All @@ -284,8 +278,7 @@ if(WITH_XPU)
operator
SRCS operator.cc transfer_scope_cache.cc unused_var_check.cc
infershape_utils.cc
DEPS xpu_op_list
op_info
DEPS op_info
proto_desc
tensor
scope
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class DenseTensor;
} // namespace phi

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif

#ifdef PADDLE_WITH_DNNL
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/phi_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ limitations under the License. */
#include "paddle/utils/test_macros.h"

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif
#ifdef PADDLE_WITH_CUSTOM_DEVICE
#include "paddle/phi/backends/custom/custom_device_op_list.h"
Expand Down
3 changes: 1 addition & 2 deletions paddle/fluid/imperative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ if(WITH_XPU)
cc_library(
prepared_operator
SRCS prepared_operator.cc
DEPS xpu_op_list
proto_desc
DEPS proto_desc
operator
device_context
lod_tensor
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/imperative/prepared_operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "paddle/phi/common/scalar.h"
#include "paddle/utils/small_vector.h"
#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif
#ifdef PADDLE_WITH_DNNL
#include "paddle/phi/core/platform/onednn_op_list.h"
Expand Down
19 changes: 0 additions & 19 deletions paddle/fluid/platform/collective_helper.cc

This file was deleted.

7 changes: 0 additions & 7 deletions paddle/fluid/platform/device/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
set(DEV_LIBS custom_device)

# XPU
if(WITH_XPU)
add_subdirectory(xpu)
endif()

# IPU
if(WITH_IPU)
add_subdirectory(ipu)
Expand Down
17 changes: 0 additions & 17 deletions paddle/fluid/platform/device/xpu/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion paddle/fluid/pybind/compiled_program.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@
#endif

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif

#ifdef PADDLE_WITH_CUSTOM_DEVICE
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/place.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ limitations under the License. */
#endif

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif

#ifdef PADDLE_WITH_CUSTOM_DEVICE
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ limitations under the License. */
#endif

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif

#ifdef PADDLE_WITH_CUSTOM_DEVICE
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pybind/tensor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ limitations under the License. */
#endif

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"
#endif

#ifdef PADDLE_WITH_CUSTOM_DEVICE
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/core/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endif()

if(WITH_XPU)
list(APPEND DEVICE_SRCS device/xpu/xpu_info.cc
device/xpu/xpu_resource_pool.cc)
device/xpu/xpu_resource_pool.cc device/xpu/xpu_op_list.cc)
endif()

if(WITH_CUSTOM_DEVICE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
/* Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifdef PADDLE_WITH_XPU
#include "paddle/fluid/platform/device/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_op_list.h"

#include <mutex>
#include <string>
#include <unordered_set>

#include "glog/logging.h"

#include "paddle/fluid/framework/convert_utils.h"
#include "paddle/phi/backends/xpu/xpu_op_kpfirst_list.h"
#include "paddle/phi/backends/xpu/xpu_op_list.h"
#include "paddle/phi/core/framework/convert_utils.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"

namespace paddle {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
/* Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

#ifdef PADDLE_WITH_XPU
#include <string>
#include <unordered_map>

#include "paddle/fluid/framework/op_kernel_type.h"
#include "paddle/phi/backends/xpu/xpu_op_list.h"
#include "paddle/phi/core/platform/device/xpu/xpu_info.h"
#ifdef PADDLE_WITH_XPU_KP
#include "paddle/phi/backends/xpu/xpu_op_kpfirst_list.h"
#endif
#include "paddle/phi/core/framework/framework.pb.h"

namespace paddle {
namespace platform {
Expand Down