-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[data] Fix map operator fusion when concurrency is set #49573
Conversation
Signed-off-by: Hao Chen <chenh1024@gmail.com>
Can the fuse operator be used as a switch to ignore the choice of GPU/CPU and concurrent settings? As long as the switch is turned on, fusion is performed. This is very useful for the situation of out-of-memory (OOM). |
Task->Task and Task->Actor are allowed. | ||
Actor->Actor and Actor->Task are not allowed. | ||
""" | ||
if isinstance(up_compute, ActorPoolStrategy): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason you are disallowing upstream op being Actor here?
Previous logic seems to permit Actor -> Task
as long as compute are compatible/same.
is_task_compute(down_logical_op._compute) and get_compute(
up_logical_op._compute
) != get_compute(down_logical_op._compute)
return False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actor -> Task is already disallowed by this condition above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for future. if resource requirements are same, should we allow Actor -> Task
fuse?
Can you just set the same args to allow fusion? |
Is it also possible if one is a CPU and the other is a GPU? |
…9573) Current operator fusion rule doesn't consider concurrency. This PR fixes this issue by only allow fusing 2 operators when they have the same concurrency. For task->actor, we allow fusion when task's concurrency = actor's upper bound. Also fixed some type hinting issues regarding compute strategy. --------- Signed-off-by: Hao Chen <chenh1024@gmail.com> Signed-off-by: Roshan Kathawate <roshankathawate@gmail.com>
Why are these changes needed?
Current operator fusion rule doesn't consider concurrency.
This PR fixes this issue by only allow fusing 2 operators when they have the same concurrency.
For task->actor, we allow fusion when task's concurrency = actor's upper bound.
Also fixed some type hinting issues regarding compute strategy.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.