CLI: GPU and init options#40301
Closed
AmelBawa-msft wants to merge 2 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CLI surface area for container GPU access and init behavior in the Windows wslc toolchain, wiring new flags through argument parsing, models, and container launch flags, and extending E2E coverage and help output.
Changes:
- Add
--gpusand--inittocontainer run/container createcommands and parse them intoContainerOptions. - Forward the new options as
WSLCContainerFlagsGpu/WSLCContainerFlagsInitwhen launching containers. - Add localization entries and update E2E tests (including expected
--helpoutput) for both commands.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/windows/wslc/e2e/WSLCE2EContainerRunTests.cpp | Adds E2E tests for container run --init / --gpus and updates expected help text. |
| test/windows/wslc/e2e/WSLCE2EContainerCreateTests.cpp | Adds E2E tests for container create --init / --gpus and updates expected help text. |
| src/windows/wslc/tasks/ContainerTasks.cpp | Maps new CLI args to ContainerOptions (Gpu, Init). |
| src/windows/wslc/services/ContainerService.cpp | Translates ContainerOptions into WSLC container flags for launch. |
| src/windows/wslc/services/ContainerModel.h | Extends ContainerOptions with Gpu and Init booleans. |
| src/windows/wslc/commands/ContainerRunCommand.cpp | Registers ArgType::Gpu and ArgType::Init for container run. |
| src/windows/wslc/commands/ContainerCreateCommand.cpp | Registers ArgType::Gpu and ArgType::Init for container create. |
| src/windows/wslc/arguments/ArgumentDefinitions.h | Defines new argument types Gpu (--gpus) and Init (--init) with localized descriptions. |
| localization/strings/en-US/Resources.resw | Adds localized descriptions for --gpus and --init. |
Member
|
--gpus sets the flag but nothing in the backend reads it. No DeviceRequests in HostConfig, no handling in WSLCContainer.cpp, IDL still has a TODO. This is a silent no-op. Either wire it up or pull the flag until it works. |
Member
|
The |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of the Pull Request
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed