Skip to content

Conversation

MrAta
Copy link
Contributor

@MrAta MrAta commented Dec 3, 2024

Motivation

During server args construction we check the gpu memory size to configure knobs like chunked prefill and cuda graph sizes.
For use cases where the args are constructed programmatically on a non-GPU environment and sent to a GPU environment, this fails because we use nvidia-smi to check nv GPU memory size while it's not available in those environments.

Modifications

Add a check for gpu availability before checking the memory size.

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

Signed-off-by: Ata Fatahi <immrata@gmail.com>
Copy link
Collaborator

@ByronHsu ByronHsu left a comment

Choose a reason for hiding this comment

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

LGTM to unblock our internal use. cc @merrymercy for the final stamp

@zhyncs zhyncs merged commit ed45e50 into sgl-project:main Dec 4, 2024
15 checks passed
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
Signed-off-by: Ata Fatahi <immrata@gmail.com>
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