Add gds mode to nvcdi API

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-03-06 14:34:40 +02:00
parent 9435343541
commit ebe18fbb7f
3 changed files with 89 additions and 0 deletions

View File

@@ -89,6 +89,11 @@ func New(opts ...Option) Interface {
lib = (*nvmllib)(l)
case ModeWsl:
lib = (*wsllib)(l)
case ModeGds:
if l.class == "" {
l.class = "gds"
}
lib = (*gdslib)(l)
default:
// TODO: We would like to return an error here instead of panicking
panic("Unknown mode")