Skip to content

Separate nvcdi construction options from runtime options#1659

Merged
elezar merged 7 commits intoNVIDIA:mainfrom
elezar:refactor-nvcdi-options
Feb 20, 2026
Merged

Separate nvcdi construction options from runtime options#1659
elezar merged 7 commits intoNVIDIA:mainfrom
elezar:refactor-nvcdi-options

Conversation

@elezar
Copy link
Member

@elezar elezar commented Feb 17, 2026

This change pulls the options required by the nvcdilib type to construct the type to a new options type. These values are then used to isntantiate an nvcdilib instance with with the values required to generate the CDI spec as required.

@elezar elezar requested a review from jgehrcke February 17, 2026 13:15
@coveralls
Copy link

coveralls commented Feb 17, 2026

Pull Request Test Coverage Report for Build 22141762110

Details

  • 133 of 172 (77.33%) changed or added relevant lines in 10 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.7%) to 40.875%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/modifier/cdi.go 0 1 0.0%
pkg/nvcdi/driver-wsl.go 0 1 0.0%
pkg/nvcdi/lib-nvml.go 0 1 0.0%
pkg/nvcdi/management.go 0 1 0.0%
pkg/nvcdi/gated.go 0 2 0.0%
pkg/nvcdi/mode.go 3 6 50.0%
pkg/nvcdi/lib.go 51 56 91.07%
pkg/nvcdi/options.go 73 98 74.49%
Files with Coverage Reduction New Missed Lines %
pkg/nvcdi/lib.go 3 69.66%
Totals Coverage Status
Change from base Build 22141012677: 1.7%
Covered Lines: 6023
Relevant Lines: 14735

💛 - Coveralls

@elezar elezar force-pushed the refactor-nvcdi-options branch 3 times, most recently from 5a99fe2 to cec1b16 Compare February 18, 2026 09:31
@elezar elezar requested a review from klueska February 18, 2026 09:55
@elezar elezar force-pushed the refactor-nvcdi-options branch 4 times, most recently from 4375034 to 08f5ebf Compare February 18, 2026 13:30
This adds basic tests for the following modes:
* imex
* csv

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change stores the mode in the gatedlib struct instead of requiring
that it be associated with the nvcdilib type.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change moves the determination of the mode-specific default vendor
to a function attached to the options type.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change moves the determination of the mode-specific default class
to a function attached to the options type.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar force-pushed the refactor-nvcdi-options branch from 08f5ebf to 7481055 Compare February 19, 2026 15:15
@elezar elezar merged commit 2bffb66 into NVIDIA:main Feb 20, 2026
16 checks passed
@elezar elezar deleted the refactor-nvcdi-options branch February 20, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants