-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[test] adjust timeout and dram host mem for amd ci #11059
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
Conversation
Summary of ChangesHello @sunxxuns, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on optimizing memory consumption within the system, particularly for continuous integration (CI) environments that may have limited resources or lack virtual DRAM. The changes involve refining memory assertion messages for better debugging, improving the detection of AMD CI machines, and crucially, adjusting hierarchical cache memory parameters to reduce GPU and CPU memory footprint during tests on HIP-enabled systems. This ensures more stable and efficient test execution in resource-constrained CI setups. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request aims to reduce GPU and CPU memory consumption for CI environments, particularly for machines without virtual DRAM. The changes primarily involve adjusting memory-related parameters for tests running on AMD GPUs. Specifically, mem-fraction-static and hicache-size are lowered in test/srt/hicache/test_hicache.py. Additionally, the utility function is_in_amd_ci is updated to be more robust by checking for a HIP environment directly. My review focuses on the correctness of these changes. While the adjustments for CI seem appropriate, I've identified an issue in the updated assertion message in python/sglang/srt/mem_cache/memory_pool_host.py. The calculation for memory size in GB is incorrect, and I've provided a suggestion to fix it. The other changes look good.
| assert ( | ||
| self.size > device_pool.size | ||
| ), "The host memory should be larger than the device memory with the current protocol" | ||
| ), f"The host memory {self.size / 1024**3} GB should be larger than the device memory {device_pool.size/ 1024**3} GB with the current protocol" |
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 calculation for memory size in the assertion message is incorrect. self.size and device_pool.size represent the number of tokens, not the size in bytes. To correctly calculate the size in GB, you should multiply the token count by self.size_per_token before dividing by 1024**3. I've also added formatting to improve readability.
| assert ( | |
| self.size > device_pool.size | |
| ), "The host memory should be larger than the device memory with the current protocol" | |
| ), f"The host memory {self.size / 1024**3} GB should be larger than the device memory {device_pool.size/ 1024**3} GB with the current protocol" | |
| assert ( | |
| self.size > device_pool.size | |
| ), f"The host memory {(self.size * self.size_per_token) / 1024**3:.2f} GB should be larger than the device memory {(device_pool.size * self.size_per_token) / 1024**3:.2f} GB with the current protocol" |
92d1f69 to
ba3f2ba
Compare
ba3f2ba to
f72f622
Compare
Motivation
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist