[refactor]: Replace use_cufile with use_gds/gds_backend config flags#2858
[refactor]: Replace use_cufile with use_gds/gds_backend config flags#2858DongDongJu merged 1 commit intoLMCache:devfrom
Conversation
Summary of ChangesHello, 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 refactors the GPU Direct Storage (GDS) backend configuration to be more generic and extensible. The changes introduce new top-level configuration flags and rename existing ones, moving away from NVIDIA cuFile-specific terminology to a more backend-agnostic approach. This prepares the system for future support of alternative GDS implementations, such as AMD hipFile AIS, by centralizing GDS control and selection. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the GDS backend configuration to be backend-agnostic, replacing use_cufile with use_gds and introducing a gds_backend configuration flag. The changes are applied throughout the configuration, documentation, and tests. The review identified a redundant code check and a documentation typo that could be addressed to improve code quality.
95eb201 to
ab54625
Compare
DongDongJu
left a comment
There was a problem hiding this comment.
Thanks for this refactoring. I left one question.
sammshen
left a comment
There was a problem hiding this comment.
LGTM! please address @DongDongJu's comments
Head branch was pushed to by a user without write access
ab54625 to
1710819
Compare
1710819 to
ecfb252
Compare
Head branch was pushed to by a user without write access
ecfb252 to
1a121ee
Compare
1a121ee to
f1241da
Compare
f1241da to
b584020
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 4 total unresolved issues (including 3 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b584020. Configure here.
d126740 to
6d552f5
Compare
Follow up work post LMCache#2799 (AMD hipFile AIS support). Refactor the GDS backend configuration to be backend-agnostic: - Replace extra_config["use_cufile"] with top-level use_gds (bool) config - Add gds_backend config field ("cufile" default) to select GDS library - Rename cufile_buffer_size to gds_buffer_size - Rename internal attributes: self.cufile -> self.gds_module, self._cufile_driver -> self._gds_driver, self.cufile_base_pointer -> self.gds_base_pointer - Update tests and documentation accordingly New env vars: LMCACHE_USE_GDS, LMCACHE_GDS_BACKEND, LMCACHE_GDS_BUFFER_SIZE Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
6d552f5 to
217b6b9
Compare

Follow up work post #2799 (AMD hipFile AIS support).
Refactor the GDS backend configuration to be backend-agnostic:
New env vars: LMCACHE_USE_GDS, LMCACHE_GDS_BACKEND, LMCACHE_GDS_BUFFER_SIZE
Generated with Devin
What this PR does / why we need it:
Special notes for your reviewers:
If applicable:
Note
Medium Risk
Touches the
GdsBackendinitialization and allocator selection paths, which are performance/IO-critical and could change runtime behavior (e.g., auto-disabling GDS on certain filesystems or selecting the wrong backend). Overall scope is contained to configuration and GDS backend wiring, with tests/docs updated accordingly.Overview
Refactors GDS configuration to be backend-agnostic: replaces
extra_configflags (use_cufile/use_hipfile) with top-leveluse_gdsplus agds_backendselector (cufile/hipfile), and renamescufile_buffer_sizetogds_buffer_size(including new env vars likeLMCACHE_GDS_BUFFER_SIZE,LMCACHE_USE_GDS,LMCACHE_GDS_BACKEND).Updates
GdsBackendto route imports/driver setup through the chosen backend module, standardizes internal naming (gds_module,_gds_driver,gds_base_pointer), and tweaks filesystem-based auto-disable logic to only override defaults whenuse_gdswasn’t explicitly set. Tests, sample configs, Buildkite config, and docs are updated to the new keys and behavior.Reviewed by Cursor Bugbot for commit 217b6b9. Bugbot is set up for automated code reviews on this repo. Configure here.