diff --git a/paddle/fluid/framework/fleet/heter_ps/heter_resource.h b/paddle/fluid/framework/fleet/heter_ps/heter_resource.h index badc7e98a65181645ce3b4945ec80acc786a7e17..164fca22768006a8872b0eee511e9ca5ed4562d1 100644 --- a/paddle/fluid/framework/fleet/heter_ps/heter_resource.h +++ b/paddle/fluid/framework/fleet/heter_ps/heter_resource.h @@ -94,39 +94,6 @@ using DevPlace = platform::XPUPlace; using AnyDeviceGuard = platform::XPUDeviceGuard; #endif -#elif defined(PADDLE_WITH_XPU_KP) -class XPUResource { - public: - XPUResource(std::vector& device_id, int index); // NOLINT - virtual ~XPUResource(); - XPUResource(const XPUResource&) = delete; - XPUResource& operator=(const XPUResource&) = delete; - - int dev_id() const { return dev_id_; } - int index() const { return index_; } - XPUStream local_stream(int num) { return local_streams_[num]; } - XPUStream remote_stream(int num) { return remote_streams_[num]; } - XPUStream comm_stream(int num) { return comm_streams_[num]; } - - int dev_id_; - int index_; - std::vector dev_ids_; - std::vector remote_streams_; - std::vector local_streams_; - std::vector comm_streams_; -}; -#endif - -#if defined(PADDLE_WITH_CUDA) -using DevResource = GPUResource; -using DevPlace = platform::CUDAPlace; -using AnyDeviceGuard = platform::CUDADeviceGuard; -#elif defined(PADDLE_WITH_XPU_KP) -using DevResource = XPUResource; -using DevPlace = platform::XPUPlace; -using AnyDeviceGuard = platform::XPUDeviceGuard; -#endif - class HeterPsResource { public: explicit HeterPsResource(const std::vector& dev_ids);