Skip to content

Commit

Permalink
[fpga/wiki/servan] Add fpga on wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
berardbe committed May 19, 2022
1 parent c3b5729 commit a914dec
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 13 deletions.
12 changes: 10 additions & 2 deletions data/grid5000/sites/grenoble/clusters/servan/nodes/servan-1.json
Expand Up @@ -276,39 +276,45 @@
},
{
"device": "fpga0",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"ip": "172.16.23.11",
"ip6": "2001:660:4406:100:8:1:0:1",
"kavlan": true,
"mac": "00:0a:35:06:4a:b8",
"management": false,
"model": "Alveo U200 QSFP28 (100GbE)",
"mountable": true,
"mounted": false,
"network_address": "servan-1-fpga0.grenoble.grid5000.fr",
"rate": 100000000000,
"sriov": false,
"sriov_totalvfs": 0,
"switch": "gw",
"switch_port": "ethernet1/1/97"
"switch_port": "ethernet1/1/97",
"vendor": "Xilinx"
},
{
"device": "fpga1",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"ip": "172.16.23.21",
"ip6": "2001:660:4406:100:8:2:0:1",
"kavlan": true,
"mac": "00:0a:35:06:4a:b9",
"management": false,
"model": "Alveo U200 QSFP28 (100GbE)",
"mountable": true,
"mounted": false,
"network_address": "servan-1-fpga1.grenoble.grid5000.fr",
"rate": 100000000000,
"sriov": false,
"sriov_totalvfs": 0,
"switch": "gw",
"switch_port": "ethernet1/1/98"
"switch_port": "ethernet1/1/98",
"vendor": "Xilinx"
}
],
"operating_system": {
Expand All @@ -321,6 +327,8 @@
},
"other_devices": {
"fpga0": {
"core": 0,
"count": 1,
"model": "Alveo U200",
"type": "fpga",
"vendor": "Xilinx"
Expand Down
12 changes: 10 additions & 2 deletions data/grid5000/sites/grenoble/clusters/servan/nodes/servan-2.json
Expand Up @@ -276,39 +276,45 @@
},
{
"device": "fpga0",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"ip": "172.16.23.12",
"ip6": "2001:660:4406:100:8:1:0:2",
"kavlan": true,
"mac": "00:0a:35:06:4a:dc",
"management": false,
"model": "Alveo U200 QSFP28 (100GbE)",
"mountable": true,
"mounted": false,
"network_address": "servan-2-fpga0.grenoble.grid5000.fr",
"rate": 100000000000,
"sriov": false,
"sriov_totalvfs": 0,
"switch": "gw",
"switch_port": "ethernet1/1/99"
"switch_port": "ethernet1/1/99",
"vendor": "Xilinx"
},
{
"device": "fpga1",
"driver": "xrt",
"enabled": true,
"interface": "Ethernet-fpga",
"ip": "172.16.23.22",
"ip6": "2001:660:4406:100:8:2:0:2",
"kavlan": true,
"mac": "00:0a:35:06:4a:dd",
"management": false,
"model": "Alveo U200 QSFP28 (100GbE)",
"mountable": true,
"mounted": false,
"network_address": "servan-2-fpga1.grenoble.grid5000.fr",
"rate": 100000000000,
"sriov": false,
"sriov_totalvfs": 0,
"switch": "gw",
"switch_port": "ethernet1/1/100"
"switch_port": "ethernet1/1/100",
"vendor": "Xilinx"
}
],
"operating_system": {
Expand All @@ -321,6 +327,8 @@
},
"other_devices": {
"fpga0": {
"core": 0,
"count": 1,
"model": "Alveo U200",
"type": "fpga",
"vendor": "Xilinx"
Expand Down
18 changes: 18 additions & 0 deletions input/grid5000/sites/grenoble/clusters/servan/servan.yaml
Expand Up @@ -66,16 +66,34 @@ nodes:
pci-0000:c4:00.0-nvme-1:
interface: NVME
id: disk1
other_devices:
fpga0:
count: 1
core: 0
servan-1:
network_adapters:
fpga0:
mac: 00:0A:35:06:4A:B8
driver: xrt
model: Alveo U200 QSFP28 (100GbE)
vendor: Xilinx
fpga1:
mac: 00:0A:35:06:4A:B9
driver: xrt
model: Alveo U200 QSFP28 (100GbE)
vendor: Xilinx
servan-2:
network_adapters:
fpga0:
mac: 00:0A:35:06:4A:DC
driver: xrt
model: Alveo U200 QSFP28 (100GbE)
vendor: Xilinx
fpga1:
mac: 00:0A:35:06:4A:DD
driver: xrt
model: Alveo U200 QSFP28 (100GbE)
vendor: Xilinx



28 changes: 22 additions & 6 deletions lib/refrepo/gen/wiki/generators/hardware.rb
Expand Up @@ -122,6 +122,13 @@ def generate_totals
net_models = interfaces.inject(Hash.new(0)){ |h, v| h[v] += 1; h }
# Sort by interface type (eth or IB) and then by driver
net_models.sort_by { |k, _v| [k.first[:sort], k[1][:sort]] }.each { |k, v|
# If network_adapters == "Ethernet-fpga" then add "*" on all colmuns after text
if k.first[:text] == "Ethernet-fpga"
k.each_with_index { |_v, i|
k[i][:text] = k[i][:text] + "*"
}
end

init(data, 'net_models', k)
data['net_models'][k][site_uid] += v
}
Expand Down Expand Up @@ -154,6 +161,13 @@ def generate_totals
}

# Accelerators
f = node_hash['other_devices']
fpga_families = {}
fpga_families[["#{f['fpga0']['vendor']} (#{f['fpga0']['type']})"]] = 1 if f and f['fpga0']
fpga_details = {}
# We don't have information about the number of cores, by default we add it manually to 0
fpga_details[["#{f['fpga0']['vendor']} #{f['fpga0']['model']} (#{f['fpga0']['type']})"]] = [f['fpga0']['count'], f['fpga0']['core']] if f and f['fpga0']

m = node_hash['mic']

mic_families = {}
Expand Down Expand Up @@ -189,15 +203,18 @@ def generate_totals
}
end

gpu_families.merge(mic_families).sort.to_h.each { |k, v|
gpu_families.merge(mic_families).merge(fpga_families).sort.to_h.each { |k, v|
init(data, 'acc_families', k)
data['acc_families'][k][site_uid] += v
}

gpu_details.merge(mic_details).sort.to_h.each { |k, v|
gpu_details.merge(mic_details).merge(fpga_details).sort.to_h.each { |k, v|
init(data, 'acc_models', k)
data['acc_models'][k][site_uid] += v[0]

# Add in acc_models fpga_details only for acc_models
}
# Add gpu_details.merge(mic_details) only for acc_cores
gpu_details.merge(mic_details).sort.to_h.each { |k, v|
init(data, 'acc_cores', k)
data['acc_cores'][k][site_uid] += v[1]
}
Expand Down Expand Up @@ -240,7 +257,6 @@ def generate_totals
generated_content += "\n== Network interconnects ==\n"
table_columns = ['Interconnect'] + sites + ['Cards total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'net_interconnects'))

generated_content += "\n== Nodes with several Ethernet interfaces ==\n"
generated_content += generate_interfaces

Expand All @@ -250,7 +266,7 @@ def generate_totals
generated_content += "\n== Network interface models ==\n"
table_columns = ['Type', 'Driver', 'Model'] + sites + ['Cards total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'net_models'))

generated_content += "\n''*: By default network interface on fpga card is not supported by OS''"
generated_content += "\n= Storage ="
generated_content += "\n== SSD models ==\n"
table_columns = ['SSD interface', 'Model', 'Size'] + sites + ['SSDs total']
Expand All @@ -259,7 +275,7 @@ def generate_totals
generated_content += generate_storage
generated_content += "\n''*: disk is [[Disk_reservation|reservable]]''"

generated_content += "\n= Accelerators (GPU, Xeon Phi) ="
generated_content += "\n= Accelerators (GPU, Xeon Phi, FPGA) ="
generated_content += "\n== Accelerator families ==\n"
table_columns = ['Accelerator family'] + sites + ['Accelerators total']
generated_content += MW.generate_table(table_options, table_columns, get_table_data(data, 'acc_families'))
Expand Down
19 changes: 16 additions & 3 deletions lib/refrepo/gen/wiki/generators/site_hardware.rb
Expand Up @@ -236,12 +236,14 @@ def self.generate_description(site)
end

accelerators = nil
if h['gpu_str'] != '' && h['mic_str'] != ''
accelerators = 'GPU/Xeon Phi'
if h['gpu_str'] != '' && h['mic_str'] != '' && h['fpga_str'] != ''
accelerators = 'GPU/Xeon Phi/FPGA'
elsif h['gpu_str'] != ''
accelerators = 'GPU'
elsif h['mic_str'] != ''
accelerators = 'Xeon Phi'
elsif h['fpga_str'] != ''
accelerators = 'FPGA'
end
hash = {}
hash['Access condition'] = access_conditions.join(", ") if not access_conditions.empty?
Expand Down Expand Up @@ -508,9 +510,20 @@ def get_hardware(sites)
else
''
end
# Add fpga_str information
fpga = node_hash['other_devices']
hard['fpga_str'] = if fpga
(fpga['fpga0']['count'].to_i == 1 ? '' : fpga['fpga0']['count'].to_s + ' x ') + fpga['fpga0']['vendor'].to_s + ' ' + fpga['fpga0']['model'].to_s.gsub(' ', ' ')
else
''
end
hard['accelerators'] = hard['gpu_str'] != '' ? hard['gpu_str'] + (hard['mic_str'] != '' ? ' ; ' + hard['mic_str'] : '') : hard['mic_str']
hard['accelerators_long'] = hard['gpu_str_long'] != '' ? hard['gpu_str_long'] + (hard['mic_str'] != '' ? ' ; ' + hard['mic_str'] : '') : hard['mic_str']
# Add fpga string in accelerator array after gpu string and mic string only if fpga_str is not empty
hard['accelerators'] += hard['fpga_str'] if hard['fpga_str'] != ''

hard['accelerators_long'] = hard['gpu_str_long'] != '' ? hard['gpu_str_long'] + (hard['fpga_str'] != '' ? ' ; ' + hard['fpga_str'] : '') : hard['fpga_str']
# Add fpga string in accelerator_long array after gpu string and mic string only if fpga_str is not empty
hard['accelerators_long'] += ' ; ' + hard['mic_str'] if hard['mic_str'] != ''
add(hardware[site_uid][cluster_uid], node_uid, hard)
}
}
Expand Down

0 comments on commit a914dec

Please sign in to comment.