Skip to content

Commit c88a414

Browse files
committed
Fix
1 parent 07af41d commit c88a414

38 files changed

+91
-94
lines changed

paddle/cinn/ir/group_schedule/search/measurer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Measurer {
5353
std::string compile_label_;
5454
std::string execute_label_;
5555
::pir::Program* program_;
56-
paddle::platform::Place place_ = paddle::platform::CUDAPlace(0);
56+
phi::Place place_ = phi::GPUPlace(0);
5757
std::unique_ptr<pir::Program> kernel_program_;
5858
std::unique_ptr<paddle::framework::Scope> exe_scope_ =
5959
std::make_unique<paddle::framework::Scope>();

paddle/fluid/framework/compiled_program.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static std::unordered_set<std::string> ReaderOpSet() {
5555

5656
class CompiledProgramPrivate {
5757
public:
58-
CompiledProgramPrivate(const std::vector<platform::Place> &places,
58+
CompiledProgramPrivate(const std::vector<phi::Place> &places,
5959
Scope *global_scope)
6060
: places_(places), global_scope_(global_scope) {}
6161

@@ -314,7 +314,7 @@ class CompiledProgramPrivate {
314314
#endif
315315

316316
BuildStrategy build_strategy_;
317-
std::vector<platform::Place> places_;
317+
std::vector<phi::Place> places_;
318318
std::vector<Scope *> local_scopes_;
319319
Scope *global_scope_; // not owned
320320

@@ -497,7 +497,7 @@ std::vector<Scope *> &CompiledProgram::GetLocalScopes() {
497497
return member_->local_scopes_;
498498
}
499499

500-
void InitP2P(const std::vector<platform::Place> &places) {
500+
void InitP2P(const std::vector<phi::Place> &places) {
501501
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
502502
std::call_once(p2p_init_flag, [&]() {
503503
int count = places.size();
@@ -541,7 +541,7 @@ void InitP2P(const std::vector<platform::Place> &places) {
541541
#endif
542542
}
543543

544-
CompiledProgram::CompiledProgram(const std::vector<platform::Place> &places,
544+
CompiledProgram::CompiledProgram(const std::vector<phi::Place> &places,
545545
const std::vector<std::string> &bcast_vars,
546546
const std::string &loss_var_name,
547547
Scope *scope,

paddle/fluid/framework/compiled_program.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CompiledProgram {
4545
DISABLE_COPY_AND_ASSIGN(CompiledProgram);
4646

4747
public:
48-
TEST_API explicit CompiledProgram(const std::vector<platform::Place> &places,
48+
TEST_API explicit CompiledProgram(const std::vector<phi::Place> &places,
4949
const std::vector<std::string> &bcast_vars,
5050
const std::string &loss_var_name,
5151
Scope *scope,

paddle/fluid/framework/custom_operator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static void RegisterOperatorKernelWithPlace(
896896
const std::string& name,
897897
const OperatorWithKernel::OpKernelFunc& op_kernel_func,
898898
const proto::VarType::Type type,
899-
const platform::Place& place) {
899+
const phi::Place& place) {
900900
OpKernelType key(type, place);
901901
VLOG(3) << "Custom Operator: op kernel key: " << key;
902902
OperatorWithKernel::AllOpKernels()[name][key] = op_kernel_func;

paddle/fluid/framework/data_device_transform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace paddle {
2222
namespace framework {
2323

2424
void TransDataDevice(const phi::DenseTensor& in,
25-
const platform::Place& dst_place,
25+
const phi::Place& dst_place,
2626
phi::DenseTensor* out);
2727

2828
} // namespace framework

paddle/fluid/framework/device_worker.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class HogwildWorker : public CPUWorkerBase {
271271
std::vector<std::pair<std::string, std::string>> cast_vars;
272272
template <typename TCopyer>
273273
void CopyInputs(const Scope* root,
274-
const platform::Place& place,
274+
const phi::Place& place,
275275
Scope* scope,
276276
TCopyer* copyer);
277277
template <typename TCopyer>
@@ -630,7 +630,7 @@ class PSGPUWorker : public HogwildWorker {
630630

631631
int OpRunAndShapeCheck(OperatorBase& op, // NOLINT
632632
const Scope& scope,
633-
const platform::Place& place);
633+
const phi::Place& place);
634634

635635
private:
636636
int mpi_rank_;
@@ -736,7 +736,7 @@ class SectionWorker : public DeviceWorker {
736736

737737
void PrintFetchVars() override {}
738738

739-
const platform::Place& place() const { return place_; }
739+
const phi::Place& place() const { return place_; }
740740

741741
void SetDeviceIndex(int tid UNUSED) override {}
742742
void SetThreadIndex(int thread_id) { thread_id_ = thread_id; }
@@ -808,7 +808,7 @@ class HeterSectionWorker : public DeviceWorker {
808808
void BindingDataFeedMemory() override {}
809809
void BindingDataFeedMemory(int micro_id);
810810
void PrintFetchVars() override;
811-
const platform::Place& place() const { return place_; }
811+
const phi::Place& place() const { return place_; }
812812

813813
void SetDeviceIndex(int tid) override { thread_id_ = tid; }
814814
// void SetThreadNum(int thread_num) { thread_num_ = thread_num; }
@@ -831,7 +831,7 @@ class HeterSectionWorker : public DeviceWorker {
831831
}
832832
void CopyParameters(int microbatch_id,
833833
const ProgramDesc& program,
834-
const platform::Place& place);
834+
const phi::Place& place);
835835
void SetMinibatchScope(Scope* scope) { minibatch_scope_ = scope; }
836836
void SetTrainerId(int trainer_id) { this->trainer_id_ = trainer_id; }
837837
void SetTrainers(int trainers) { this->trainers_ = trainers; }

paddle/fluid/framework/downpour_lite_worker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ void DownpourLiteWorker::TrainFilesWithProfiler() {
427427
/**
428428
* @brief add auc monitor
429429
*/
430-
inline void AddAucMonitor(const Scope* scope, const platform::Place& place) {
430+
inline void AddAucMonitor(const Scope* scope, const phi::Place& place) {
431431
auto metric_ptr = Metric::GetInstance();
432432
auto& metric_list = metric_ptr->GetMetricList();
433433
for (auto& metric_item : metric_list) {

paddle/fluid/framework/downpour_worker.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ void DownpourWorker::TrainFilesWithProfiler() {
787787
/**
788788
* @brief add auc monitor
789789
*/
790-
inline void AddAucMonitor(const Scope* scope, const platform::Place& place) {
790+
inline void AddAucMonitor(const Scope* scope, const phi::Place& place) {
791791
auto metric_ptr = Metric::GetInstance();
792792
auto& metric_list = metric_ptr->GetMetricList();
793793
for (auto iter = metric_list.begin(); iter != metric_list.end(); iter++) {

paddle/fluid/framework/executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ExecutorPrepareContext::~ExecutorPrepareContext() {
6666
VLOG(5) << "destroy ExecutorPrepareContext";
6767
}
6868

69-
Executor::Executor(const platform::Place& place) : place_(place) {}
69+
Executor::Executor(const phi::Place& place) : place_(place) {}
7070

7171
Executor::~Executor() {
7272
#ifdef PADDLE_WITH_DNNL

paddle/fluid/framework/executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class TEST_API Executor {
6363
explicit Executor(const platform::DeviceContext& device)
6464
: Executor(device.GetPlace()) {}
6565

66-
explicit Executor(const platform::Place& place);
66+
explicit Executor(const phi::Place& place);
6767

6868
~Executor();
6969
/*

0 commit comments

Comments
 (0)