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

[FleetExecutor]Add interceptor message handle #37093

Merged

Conversation

wangxicoding
Copy link
Contributor

@wangxicoding wangxicoding commented Nov 10, 2021

PR types

Others

PR changes

Others

Describe

Add interceptor message handle and send function

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@wangxicoding wangxicoding changed the title Add interceptor message handle [FleetExecutor]Add interceptor message handle Nov 10, 2021
@@ -32,13 +33,21 @@ namespace distributed {
class TaskNode;

class Interceptor {
public:
using InterceptorHandle = std::function<void(const InterceptorMessage&)>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InterceptorMessageHandle? 🤣

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too looooong

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MsgHandle?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next PR

Copy link
Contributor

@FeixLiu FeixLiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -49,6 +58,8 @@ class Interceptor {
bool EnqueueRemoteInterceptorMessage(
const InterceptorMessage& interceptor_message);

void Send(int64_t dst_id, std::unique_ptr<InterceptorMessage> msg);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么要用unique_ptr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能需要改写message,没有用const引用,然后send出去应该就交给message bus管理了,就先用了unique_ptr,理论上用shared_ptr或者直接一个指针也行。

@wangxicoding wangxicoding merged commit 643fd2f into PaddlePaddle:develop Nov 10, 2021
@wangxicoding wangxicoding deleted the add_interceptor_handle branch November 10, 2021 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants