Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phi decoupling] decouple dependency to device_context in phi (Part 1) #50865

Merged
merged 61 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4f47d03
move DeviceContextPool to phi
huangjiyi Feb 22, 2023
2c31c03
add EmplaceExternalContextFunc
huangjiyi Feb 22, 2023
e221755
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Feb 23, 2023
a200e0b
update namespace
huangjiyi Feb 23, 2023
2b650d9
update cmake
huangjiyi Feb 23, 2023
a97fd08
fix bugs and create context_pool_impl.h
huangjiyi Feb 23, 2023
c24a364
replace platform::is_xxx_place
huangjiyi Feb 24, 2023
28cbc2d
fix bugs
huangjiyi Feb 24, 2023
013d3fe
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Feb 24, 2023
5832b20
update generator
huangjiyi Feb 24, 2023
4c44ebf
fix bugs
huangjiyi Feb 24, 2023
15bf4dc
fix bugs
huangjiyi Feb 24, 2023
f643c8c
fix bugs
huangjiyi Feb 24, 2023
2f9c231
fix bugs
huangjiyi Feb 24, 2023
7318637
fix bugs
huangjiyi Feb 25, 2023
54365d8
fix bugs
huangjiyi Feb 25, 2023
ec9d8b6
fix bugs
huangjiyi Feb 26, 2023
5f521f0
fix enforce usage
huangjiyi Feb 26, 2023
3a31615
Revert "fix enforce usage"
huangjiyi Feb 26, 2023
2923c89
fix bugs
huangjiyi Feb 26, 2023
afe11a8
rm XPUDeviceContext and CustomDeviceContext
huangjiyi Feb 27, 2023
76d4cbc
Merge branch 'move_device_context' of https://github.com/huangjiyi/Pa…
huangjiyi Feb 27, 2023
abc08b0
fix bugs
huangjiyi Feb 27, 2023
264570d
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Feb 27, 2023
ad220ce
fix fix context init bug
huangjiyi Feb 27, 2023
64cdd80
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Feb 27, 2023
f2076a0
fix bugs after merge
huangjiyi Feb 27, 2023
a36ce9a
fix bugs
huangjiyi Feb 27, 2023
7105c5e
fix name
huangjiyi Feb 28, 2023
b62deb0
fix mutable_data
huangjiyi Feb 28, 2023
ba7038b
update and fix bugs
huangjiyi Mar 1, 2023
7e58367
fix bugs
huangjiyi Mar 1, 2023
d44f548
update
huangjiyi Mar 1, 2023
90816e8
fix bugs
huangjiyi Mar 1, 2023
3616bc7
fix name
huangjiyi Mar 1, 2023
c9958a2
fix bugs
huangjiyi Mar 1, 2023
ef47ce8
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 1, 2023
d2d56f2
merge
huangjiyi Mar 1, 2023
0b826c1
fix bugs
huangjiyi Mar 1, 2023
41f3896
create context_pool in phi/backends
huangjiyi Mar 1, 2023
549981d
create context_pool in phi/backends
huangjiyi Mar 1, 2023
c6697f0
fix bugs
huangjiyi Mar 1, 2023
39f15f2
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 1, 2023
210b3cf
fix xpu bugs
huangjiyi Mar 1, 2023
2461b8d
fix rocm bugs
huangjiyi Mar 2, 2023
b7cad5f
Merge branch 'move_device_context' of https://github.com/huangjiyi/Pa…
huangjiyi Mar 2, 2023
97ca133
fix bugs
huangjiyi Mar 2, 2023
b64ada1
fix bugs
huangjiyi Mar 2, 2023
3c97400
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 2, 2023
534cdd3
fix bugs
huangjiyi Mar 2, 2023
8ab532a
fix xpu bugs
huangjiyi Mar 2, 2023
c16b7b4
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 3, 2023
7abbb10
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 3, 2023
7aa2630
update
huangjiyi Mar 3, 2023
d2d60e4
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
huangjiyi Mar 3, 2023
ab256f7
merge
huangjiyi Mar 3, 2023
74aeb56
update
huangjiyi Mar 3, 2023
3b574c2
Merge branch 'develop' into move_device_context
huangjiyi Mar 3, 2023
5fa5647
Merge branch 'move_device_context' of https://github.com/huangjiyi/Pa…
huangjiyi Mar 3, 2023
09f5eab
fix bugs
huangjiyi Mar 3, 2023
fc914e4
fix bugs
huangjiyi Mar 3, 2023
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ paddle/fluid/pybind/op_function_impl.h
paddle/fluid/pybind/*final_state_op_function_impl.h
paddle/fluid/prim/api/generated/prim_api/*
paddle/fluid/framework/__init__.py
paddle/phi/api/profiler/__init__.py
python/paddle/incubate/fleet/parameter_server/pslib/ps_pb2.py
python/paddle/fluid/incubate/fleet/parameter_server/pslib/ps_pb2.py
2 changes: 1 addition & 1 deletion paddle/fluid/operators/fused/fusion_conv_inception_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class CUDNNConvInceptionFusionOpKernel : public framework::OpKernel<T> {
PADDLE_ENFORCE_GPU_SUCCESS(platform::dynload::cudnnSetConvolutionMathType(
conv_desc[i], CUDNN_DEFAULT_MATH));
#if CUDA_VERSION >= 11000 && CUDNN_VERSION >= 8000
if (!platform::allow_tf32_cudnn) {
if (!phi::allow_tf32_cudnn) {
PADDLE_ENFORCE_GPU_SUCCESS(
platform::dynload::cudnnSetConvolutionMathType(conv_desc[i],
CUDNN_FMA_MATH));
Expand Down
7 changes: 0 additions & 7 deletions paddle/fluid/operators/math/beam_search_xpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ namespace phi {
class DenseTensor;
} // namespace phi

namespace paddle {
namespace framework {} // namespace framework
namespace platform {
class XPUDeviceContext;
} // namespace platform
} // namespace paddle

namespace paddle {
namespace operators {
namespace math {
Expand Down
1 change: 0 additions & 1 deletion paddle/fluid/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ cc_library(
cudnn_workspace_helper
${XPU_CTX_DEPS}
${MLU_CTX_DEPS}
eigen3
phi_backends
phi_device_context
generator)
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/cuda_graph_with_memory_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "paddle/fluid/platform/cuda_graph_with_memory_pool.h"

#include "paddle/fluid/memory/allocation/allocator_facade.h"
#include "paddle/phi/backends/all_context.h"
#include "paddle/phi/backends/context_pool.h"

DECLARE_bool(use_stream_safe_cuda_allocator);
DECLARE_bool(new_executor_use_cuda_graph);
Expand Down
3 changes: 2 additions & 1 deletion paddle/fluid/platform/device/custom/custom_device_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ void InitDevice() {
}
EXPECT_GT(static_cast<int>(places.size()), 0);

paddle::platform::DeviceContextPool::Init(places);
paddle::platform::DeviceContextPool::Init(
places, paddle::platform::EmplaceExternalContext);
}

void TestDeviceInterface(const paddle::platform::Place& place) {
Expand Down
Loading