-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[core] Small optimizations from accelerated DAG experiment #41418
Conversation
Signed-off-by: Eric Liang <ekhliang@gmail.com>
Signed-off-by: Eric Liang <ekhliang@gmail.com>
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.
it's cool this is all we need for the optimization! Some nit comments, but generally lgtm
Addressed. Good idea on the static assert, I was trying to get |
Signed-off-by: Eric Liang <ekhliang@gmail.com>
Signed-off-by: Eric Liang <ekhliang@gmail.com>
@@ -393,12 +393,12 @@ void ReferenceCounter::RemoveLocalReferenceInternal(const ObjectID &object_id, | |||
RAY_CHECK(!object_id.IsNil()); | |||
auto it = object_id_refs_.find(object_id); | |||
if (it == object_id_refs_.end()) { | |||
RAY_LOG(WARNING) << "Tried to decrease ref count for nonexistent object ID: " | |||
<< object_id; | |||
RAY_LOG_EVERY_MS(WARNING, 5000) |
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.
Btw, I assume these warning logs are impacting the performance, but does that mean it is more frequently printed when an accelerated DAG is used?
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.
It's definitely an issue we need to look into in the future, once we fix the ref counting.
Signed-off-by: Eric Liang <ekhliang@gmail.com>
Signed-off-by: Eric Liang <ekhliang@gmail.com>
Signed-off-by: Eric Liang <ekhliang@gmail.com>
This reverts commit 53cfcbb.
os.environ.get("RAY_ENABLE_AUTO_CONNECT", "") != "0" | ||
and not ray.is_initialized() | ||
): | ||
if enable_auto_connect and not ray.is_initialized(): |
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.
+1
Beat me to fixing this. It's a small thing but notoriously showing up in every profile
Why are these changes needed?
This ports a few micro-optimizations from the accelerated DAG experiment branch (https://github.com/ray-project/ray/pull/40991/files). The optimizations here help the most for accelerated DAG programs, but also help a bit to reduce get()/put() call overheads for normal Ray programs:
Before:
After: