GPU min/max support - #26
Merged
Merged
Conversation
ianmcorvidae
requested review from
Copilot and
slr71
and removed request for
Copilot
October 28, 2025 18:56
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds GPU resource request support to the model library by introducing GPU fields and a GPURequest() helper method, and bumps the module version from v8 to v9.
- Adds
MaxGPUsandMinGPUsfields to theContainerstruct with appropriate JSON tags - Implements
GPURequest()method following the same pattern as existing resource request methods - Comprehensive test coverage for the new GPU request functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| container.go | Adds MaxGPUs and MinGPUs fields to Container struct for GPU resource specification |
| jobs.go | Implements GPURequest() method to calculate highest minimum GPU count and updates import to v9 |
| jobs_test.go | Adds TestGPURequest() with comprehensive test cases for default, single, and multiple GPU requirements |
| go.mod | Bumps module version from v8 to v9 for major version release |
| .github/copilot-instructions.md | New project documentation file describing repository structure and development workflows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
slr71
approved these changes
Oct 28, 2025
| - Fixes should be minimal and avoid changing public APIs unless intended. Re-run `go test ./...` after fixes. | ||
|
|
||
| ## Integration points & expectations | ||
| - iRODS: the io helpers generate porklock-style arguments and expect a mounted `/configs/irods-config` inside runtime containers. |
Member
Author
|
Thanks for the reviews! |
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.
I also added copilot instructions, since I've been using those. Hopefully that's fine.
The GPURequest function and its parallels like CPURequest and MemoryRequest aren't used now, I think, because they were for the old condor setup. But I figured I'd still build in the support there until we decide to remove it.