Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Sep 4, 2024
1 parent f1de983 commit a1690fe
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 95 deletions.
70 changes: 23 additions & 47 deletions protos/infra.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,17 @@ message AttributeProto {
string name = 1;
string doc_string = 2;

oneof value {
double double_val = 3;
repeated double double_list = 4;
float float_val = 5;
repeated float float_list = 6;
int32 int32_val = 7;
repeated int32 int32_list = 8;
int64 int64_val = 9;
repeated int64 int64_list = 10;
uint32 uint32_val = 11;
repeated uint32 uint32_list = 12;
uint64 uint64_val = 13;
repeated uint64 uint64_list = 14;
sint32 sint32_val = 15;
repeated sint32 sint32_list = 16;
sint64 sint64_val = 17;
repeated sint64 sint64_list = 18;
fixed32 fixed32_val = 19;
repeated fixed32 fixed32_list = 20;
fixed64 fixed64_val = 21;
repeated fixed64 fixed64_list = 22;
sfixed32 sfixed32_val = 23;
repeated sfixed32 sfixed32_list = 24;
sfixed64 sfixed64_val = 25;
repeated sfixed64 sfixed64_list = 26;
bool bool_val = 27;
repeated bool bool_list = 28;
string string_val = 29;
repeated string string_list = 30;
bytes bytes_val = 31;
repeated bytes bytes_list = 32;

// # how to pack a proto message into AttributeProto.any_val
// nic_config = NicConfig()
// any_message = Any()
// any_message.Pack(nic_config)
// attr = AttributeProto(name="proto message", any_val=any_message)
//
// # how to unpack an AttributeProto.any_val message into a message
// nic_config = NicConfig()
// if attr.any_val.Is(NicConfig.DESCRIPTOR):
// attr.any_val.Unpack(nic_config)
google.protobuf.Any any_val = 33;
repeated google.protobuf.Any any_list = 34;
}
// # how to pack a proto message into AttributeProto.any_val
// nic_config = NicConfig()
// any_message = Any()
// any_message.Pack(nic_config)
// attr = AttributeProto(name="proto message", any_val=any_message)
//
// # how to unpack an AttributeProto.any_val message into a message
// nic_config = NicConfig()
// if attr.any_val.Is(NicConfig.DESCRIPTOR):
// attr.any_val.Unpack(nic_config)
google.protobuf.Any any_val = 3;
}

enum MemoryType {
Expand Down Expand Up @@ -356,12 +322,22 @@ message VertextRequest {
Infrastructure infrastructure = 1;
}

message VertexResponse {
repeated ComponentConnection component_edges = 1;
repeated DeviceConnection device_instance_edges = 2;
}

message EdgeRequest {
Infrastructure infrastructure = 1;
}

message EdgeResponse {
repeated ComponentConnection component_edges = 1;
repeated DeviceConnection device_instance_edges = 2;
}

service InfraService {
rpc GetVertexes(Infrastructure) returns (VertexesResponse);
rpc GetEdges(Infrastructure) return (EdgesResponse);
rpc GetVertexes(Infrastructure) returns (VertexResponse);
rpc GetEdges(Infrastructure) returns (EdgeResponse);
rpc Validate(Infrastructure) returns (google.protobuf.Empty);
}
110 changes: 62 additions & 48 deletions src/notes/infra.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
infrastructure:
devices:
- name: generic-host
components:
- name: npu
count: 8
npu:
- name: cpu
count: 2
cpu:
- name: nic
count: 8
nic:
- name: nvswitch
count: 1
nvswitch:
links:
- name: nvlink
type: LINK_NVLINK
bandwidth:
gbps: 400
- name: pcie
type: LINK_PCIE
bandwidth:
gbps: 200
connections:
- npu.*.nvlink.nvswitch.0
- npu.0.pcie.nic.0
- npu.1.pcie.nic.1
- npu.2.pcie.nic.2
- npu.3.pcie.nic.3
- npu.4.pcie.nic.4
- npu.5.pcie.nic.5
- npu.6.pcie.nic.6
- npu.7.pcie.nic.7
inventory:
devices:
- name: generic-host
components:
- name: npu
count: 8
npu:
- name: cpu
count: 2
cpu:
- name: nic
count: 8
nic:
- name: nvswitch
count: 1
nvswitch:
links:
- name: nvlink
type: LINK_NVLINK
bandwidth:
gbps: 400
- name: pcie
type: LINK_PCIE
bandwidth:
gbps: 200
connections:
- npu.*.nvlink.nvswitch.0
- npu.0.pcie.nic.0
- npu.1.pcie.nic.1
- npu.2.pcie.nic.2
- npu.3.pcie.nic.3
- npu.4.pcie.nic.4
- npu.5.pcie.nic.5
- npu.6.pcie.nic.6
- npu.7.pcie.nic.7

- name: th3switch
components:
- name: asic
count: 1
custom:
- name: nic
count: 32
nic:
- name: pcie
type: LINK_PCIE
bandwidth:
gbps: 200
connections:
- nic.*.pcie.asic.0
- name: th3switch
components:
- name: asic
count: 1
custom:
- name: nic
count: 32
nic:
- name: pcie
type: LINK_PCIE
bandwidth:
gbps: 200
connections:
- nic.*.pcie.asic.0
links:
- name: eth-100
type: LINK_ETHERNET
bandwidth:
gpbs: 100
- name: eth-400
type: LINK_ETHERNET
bandwidth:
gpbs: 400
- name: eth-800
type: LINK_ETHERNET
bandwidth:
gpbs: 800

device_instances:
- name: host
Expand Down

0 comments on commit a1690fe

Please sign in to comment.