Skip to content

Commit bd4d859

Browse files
VRAMAvailablePercentage added (#10)
* vram available added * type cange to int64 * Dup fix
1 parent 202908e commit bd4d859

File tree

4 files changed

+97
-50
lines changed

4 files changed

+97
-50
lines changed

docs/proto/provider.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@
965965
| `modelid` | [string](#string) | | |
966966
| `interface` | [string](#string) | | |
967967
| `memory_size` | [string](#string) | | |
968+
| `vram_available_percentage` | [int64](#int64) | | |
968969

969970

970971

go/inventory/v1/gpu.go

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@ func (r *GPU) Dup() GPU {
2525

2626
func (s *GPUInfo) Dup() GPUInfo {
2727
res := GPUInfo{
28-
Vendor: s.Vendor,
29-
VendorID: s.VendorID,
30-
Name: s.Name,
31-
ModelID: s.ModelID,
32-
Interface: s.Interface,
33-
MemorySize: s.MemorySize,
28+
Vendor: s.Vendor,
29+
VendorID: s.VendorID,
30+
Name: s.Name,
31+
ModelID: s.ModelID,
32+
Interface: s.Interface,
33+
MemorySize: s.MemorySize,
34+
VRAMAvailablePercentage: s.VRAMAvailablePercentage,
3435
}
3536

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

4647
for _, n := range s {
4748
res = append(res, GPUInfo{
48-
Vendor: n.Vendor,
49-
Name: n.Name,
50-
ModelID: n.ModelID,
51-
Interface: n.Interface,
52-
MemorySize: n.MemorySize,
49+
Vendor: n.Vendor,
50+
Name: n.Name,
51+
ModelID: n.ModelID,
52+
Interface: n.Interface,
53+
MemorySize: n.MemorySize,
54+
VRAMAvailablePercentage: n.VRAMAvailablePercentage,
5355
})
5456
}
5557

go/inventory/v1/gpu.pb.go

Lines changed: 78 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/provider/akash/inventory/v1/gpu.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ message GPUInfo {
4141
(gogoproto.jsontag) = "memory_size",
4242
(gogoproto.moretags) = "yaml:\"memory_size\""
4343
];
44+
int64 vram_available_percentage = 7 [
45+
(gogoproto.customname) = "VRAMAvailablePercentage",
46+
(gogoproto.jsontag) = "vram_available_percentage",
47+
(gogoproto.moretags) = "yaml:\"vram_available_percentage\""
48+
];
4449
}
4550

4651
// GPUInfo reports GPU inventory details

0 commit comments

Comments
 (0)