Skip to content

Commit

Permalink
Merge pull request #240 from dhavalpopat/gpu
Browse files Browse the repository at this point in the history
Update GPU support to allow GPU List
  • Loading branch information
dhavalpopat committed Mar 19, 2024
2 parents b607d0f + 5510136 commit 4977ccd
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 168 deletions.
1 change: 1 addition & 0 deletions common/virtualmachineconstants.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type VmSize struct {
GpuName string
MemoryMB int
GpuAssignMode GpuAssignType
GpuList []*pb.Gpu
}

// innerMap is captured in the closure returned below
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.3
github.com/golang/protobuf v1.5.4
github.com/hectane/go-acl v0.0.0-20230122075934-ca0b05cb1adb
github.com/jmespath/go-jmespath v0.4.0
github.com/pkg/errors v0.9.1
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
Expand Down Expand Up @@ -1527,8 +1528,9 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
Expand Down
327 changes: 207 additions & 120 deletions rpc/common/moc_common_computecommon.pb.go

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions rpc/common/moc_common_computecommon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,21 @@ message WinRMConfiguration {
repeated WinRMListener Listeners = 1;
}

message Gpu {
enum AssignmentType {
GpuDDA = 0;
GpuP = 1;
}

AssignmentType assignment = 1;
int32 partitionSizeGB = 2;
}

message VirtualMachineCustomSize {
int32 cpuCount = 1;
int32 memoryMB = 2;
int32 gpuCount = 3;
repeated Gpu gpuList = 4;
}

message DynamicMemoryConfiguration {
Expand Down
100 changes: 55 additions & 45 deletions rpc/common/moc_common_nodeinfo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rpc/common/moc_common_nodeinfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ message Resources {
PhysicalMemory memory = 2;
GPU gpu = 3;
VirtualMachineCapabilities vmCapabilities = 5;
repeated Gpu gpuList = 6;
}

0 comments on commit 4977ccd

Please sign in to comment.