Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRAMAvailablePercentage added #10

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/proto/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@
| `modelid` | [string](#string) | | |
| `interface` | [string](#string) | | |
| `memory_size` | [string](#string) | | |
| `vram_available_percentage` | [int64](#int64) | | |



Expand Down
24 changes: 13 additions & 11 deletions go/inventory/v1/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ func (r *GPU) Dup() GPU {

func (s *GPUInfo) Dup() GPUInfo {
res := GPUInfo{
Vendor: s.Vendor,
VendorID: s.VendorID,
Name: s.Name,
ModelID: s.ModelID,
Interface: s.Interface,
MemorySize: s.MemorySize,
Vendor: s.Vendor,
VendorID: s.VendorID,
Name: s.Name,
ModelID: s.ModelID,
Interface: s.Interface,
MemorySize: s.MemorySize,
VRAMAvailablePercentage: s.VRAMAvailablePercentage,
}

return res
Expand All @@ -45,11 +46,12 @@ func (s GPUInfoS) Dup() GPUInfoS {

for _, n := range s {
res = append(res, GPUInfo{
Vendor: n.Vendor,
Name: n.Name,
ModelID: n.ModelID,
Interface: n.Interface,
MemorySize: n.MemorySize,
Vendor: n.Vendor,
Name: n.Name,
ModelID: n.ModelID,
Interface: n.Interface,
MemorySize: n.MemorySize,
VRAMAvailablePercentage: n.VRAMAvailablePercentage,
})
}

Expand Down
117 changes: 78 additions & 39 deletions go/inventory/v1/gpu.pb.go

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

5 changes: 5 additions & 0 deletions proto/provider/akash/inventory/v1/gpu.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ message GPUInfo {
(gogoproto.jsontag) = "memory_size",
(gogoproto.moretags) = "yaml:\"memory_size\""
];
int64 vram_available_percentage = 7 [
(gogoproto.customname) = "VRAMAvailablePercentage",
(gogoproto.jsontag) = "vram_available_percentage",
(gogoproto.moretags) = "yaml:\"vram_available_percentage\""
];
}

// GPUInfo reports GPU inventory details
Expand Down
Loading