-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[XPU] Fix OOM when manually specifying ZE_AFFINITY_MASK with Ray distributed executor on XPU #22413
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
Open
chaojun-zhang
wants to merge
7
commits into
vllm-project:main
Choose a base branch
from
chaojun-zhang:upstream/rlhf_colate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+107
−28
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f3b28df
support ray distributor executor on xpu
chaojun-zhang f4ed251
support ray distributor executor on xpu
chaojun-zhang 93be7bb
support ray distributor executor on xpu
chaojun-zhang 8293fd9
support ray distributor executor on xpu
chaojun-zhang 321268d
support ray distributor executor on xpu
chaojun-zhang 48fbb06
support ray distributor executor on xpu
chaojun-zhang 18bfd93
support ray distributor executor on xpu
chaojun-zhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is this necessary?
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.
Yes, if this is not set, the following error will occur, even I have set it in the running script.
Update the weights of the inference engines.
Traceback (most recent call last):
File "/home/chaojun/vllm/examples/offline_inference/rlhf_colocate.py", line 192, in
ray.get(
File "/home/chaojun/upstream/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 22, in auto_init_wrapper
return fn(*args, **kwargs)
File "/home/chaojun/upstream/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 104, in wrapper
return func(*args, **kwargs)
File "/home/chaojun/upstream/lib/python3.10/site-packages/ray/_private/worker.py", line 2858, in get
values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeout)
File "/home/chaojun/upstream/lib/python3.10/site-packages/ray/_private/worker.py", line 958, in get_objects
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(TypeError): ray::MyLLM.collective_rpc() (pid=1425434, ip=10.7.182.52, actor_id=3ecf23723b638fd6e5c18bfe04000000, repr=<rlhf_colocate.MyLLM object at 0x7f531a753970>)
File "/home/chaojun/vllm/vllm/entrypoints/llm.py", line 494, in collective_rpc
return self.llm_engine.collective_rpc(method, timeout, args, kwargs)
File "/home/chaojun/vllm/vllm/v1/engine/llm_engine.py", line 321, in collective_rpc
return self.engine_core.collective_rpc(method, timeout, args, kwargs)
File "/home/chaojun/vllm/vllm/v1/engine/core_client.py", line 747, in collective_rpc
return self.call_utility("collective_rpc", method, timeout, args,
File "/home/chaojun/vllm/vllm/v1/engine/core_client.py", line 692, in call_utility
self._send_input(EngineCoreRequestType.UTILITY,
File "/home/chaojun/vllm/vllm/v1/engine/core_client.py", line 678, in _send_input
*self.encoder.encode(request))
File "/home/chaojun/vllm/vllm/v1/serial_utils.py", line 87, in encode
bufs[0] = self.encoder.encode(obj)
File "/home/chaojun/vllm/vllm/v1/serial_utils.py", line 140, in enc_hook
raise TypeError(f"Object of type {type(obj)} is not serializable"
TypeError: Object of type <class 'function'> is not serializableSet VLLM_ALLOW_INSECURE_SERIALIZATION=1 to allow fallback to pickle-based serialization.
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 also happens on cuda? or xpu only.
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.
I have the same concern, we should not enable this env unless it is necessary
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.
Originally, the script would include VLLM_ALLOW_INSECURE_SERIALIZATION=1, but this parameter is not passed when launching with ray.remote. I consider this a bug.
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.
Could you explain what you mean by "originally"? Looks like this script doesn't pass lambda functions to
llm.collective_rpc
so I'm not sure why this flag is requiredUh oh!
There was an error while loading. Please reload this page.
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.
The error indicates that the ’enc_hook‘ method uses msgpack as the serialization framework, but certain objects and methods are not supported for serialization by msgpack. This requires using the switch to fall back to the pickle-based serialization framework.
By originally, I meant that this example was supposed to include this environment variable(
vllm/.buildkite/test-pipeline.yaml
Line 172 in b4f9e96
Here you can see that lambda functions (with ipc_handles) will be sent through collective_rpc. :
vllm/examples/offline_inference/rlhf_colocate.py
Line 194 in 2c67c96
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.
@youkaichao can you comment on this?