-
Notifications
You must be signed in to change notification settings - Fork 16
Add AI accelerator device mounting support in CreateControllerContainer #154
Add AI accelerator device mounting support in CreateControllerContainer #154
Conversation
Summary of ChangesHello @ericcurtin, 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 enhances container creation by enabling automatic detection and mounting of AI accelerator devices. The change ensures that containers can access necessary hardware interfaces, such as those used by Vulkan or ROCm, by mapping relevant device files from the host into the container during its setup. This streamlines the process for applications requiring direct hardware access for AI workloads. 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
|
Reviewer's GuideThis PR extends CreateControllerContainer to automatically detect and mount AI accelerator devices (e.g., Vulkan, ROCm) by globbing common device paths under /dev and adding them to the container’s hostConfig.Devices with proper permissions. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
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 adds support for mounting AI accelerator devices into the controller container. The implementation is straightforward, but there are a couple of areas for improvement regarding maintainability and efficiency. I've suggested extracting the hardcoded device paths into a package-level variable and removing a redundant os.Stat call to optimize the device discovery loop. These changes will make the code cleaner and more performant.
6edf099 to
2ffd27c
Compare
Need this to talk to device via Vulkan, ROCm, etc. Signed-off-by: Eric Curtin <[email protected]>
2ffd27c to
bf84c9d
Compare
Need this to talk to device via Vulkan, ROCm, etc.
Summary by Sourcery
Enable passthrough of various AI accelerator devices (e.g., DRM, ROCm, DaVinci) by globbing known /dev paths and adding them to the container’s device mappings with read-write-mount permissions.
New Features:
Enhancements: