Commit 4c1f5184 authored by RINGOT Patrice's avatar RINGOT Patrice

[gen:oar-properties] use the new GPU representation

parent fcf66cc9
Pipeline #89592 passed with stages
in 2 minutes and 36 seconds
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
require 'hashdiff' require 'hashdiff'
require 'refrepo/data_loader' require 'refrepo/data_loader'
require 'net/ssh' require 'net/ssh'
require 'refrepo/gpu_ref'
class MissingProperty < StandardError; end class MissingProperty < StandardError; end
...@@ -125,9 +126,10 @@ def get_ref_node_properties_internal(cluster_uid, cluster, node_uid, node) ...@@ -125,9 +126,10 @@ def get_ref_node_properties_internal(cluster_uid, cluster, node_uid, node)
h['memcpu'] = node['main_memory']['ram_size'] / node['architecture']['nb_procs']/MiB h['memcpu'] = node['main_memory']['ram_size'] / node['architecture']['nb_procs']/MiB
h['memnode'] = node['main_memory']['ram_size'] / MiB h['memnode'] = node['main_memory']['ram_size'] / MiB
if node.key?('gpu') && node['gpu']['gpu'] == true if node.key?('gpu_devices')
h['gpu_model'] = node['gpu']['gpu_model'] # This forbids a node to host different GPU models ...
h['gpu_count'] = node['gpu']['gpu_count'] h['gpu_model'] = GPURef.getGrid5000LegacyNameFor(node['gpu_devices'].values[0]['model'])
h['gpu_count'] = node['gpu_devices'].length
else else
h['gpu_model'] = false h['gpu_model'] = false
h['gpu_count'] = 0 h['gpu_count'] = 0
......
# coding: utf-8 # coding: utf-8
class GPURef require 'refrepo/gpu_ref'
@@gpu2cores = {
"GeForce RTX 2080 Ti" => 4352,
"GeForce GTX 1080 Ti" => 3584,
"Tesla P100-PCIE-16GB" => 3584,
"Tesla V100-PCIE-32GB" => 5120,
"Tesla M2075" => 448,
"GeForce GTX TITAN Black" => 2880,
"GeForce GTX 980" => 2048,
"Tesla K40m" => 2880,
}
@@new_gpu_names2old_ones = {
"GeForce RTX 2080 Ti" => "RTX 2080 Ti",
"GeForce GTX 1080 Ti" => "GTX 1080 Ti",
"Tesla P100-PCIE-16GB" => "Tesla P100",
"Tesla V100-PCIE-32GB" => "Tesla V100",
"Tesla M2075" => "Tesla M2075",
"GeForce GTX TITAN Black" => "Titan Black",
"GeForce GTX 980" => "GTX 980",
"Tesla K40m" => "Tesla K40M",
}
def self.getNumberOfCoresFor(model)
if @@gpu2cores[model]
return @@gpu2cores[model]
else
raise "Fix me: #{model} is missing"
end
end
# will not keep this, just to ease manual testing for bug #10436
def self.getGrid5000LegacyNameFor(model)
if @@new_gpu_names2old_ones[model]
return @@new_gpu_names2old_ones[model]
else
return model
end
end
end
class SiteHardwareGenerator < WikiGenerator class SiteHardwareGenerator < WikiGenerator
......
# coding: utf-8
class GPURef
@@gpu2cores = {
"GeForce RTX 2080 Ti" => 4352,
"GeForce GTX 1080 Ti" => 3584,
"Tesla P100-PCIE-16GB" => 3584,
"Tesla V100-PCIE-32GB" => 5120,
"Tesla M2075" => 448,
"GeForce GTX TITAN Black" => 2880,
"GeForce GTX 980" => 2048,
"Tesla K40m" => 2880,
}
@@new_gpu_names2old_ones = {
"GeForce RTX 2080 Ti" => "RTX 2080 Ti",
"GeForce GTX 1080 Ti" => "GTX 1080 Ti",
"Tesla P100-PCIE-16GB" => "Tesla P100",
"Tesla V100-PCIE-32GB" => "Tesla V100",
"Tesla M2075" => "Tesla M2075",
"GeForce GTX TITAN Black" => "Titan Black",
"GeForce GTX 980" => "GTX 980",
"Tesla K40m" => "Tesla K40M",
}
def self.getNumberOfCoresFor(model)
if @@gpu2cores[model]
return @@gpu2cores[model]
else
raise "Fix me: #{model} is missing"
end
end
# will not keep this, just to ease manual testing for bug #10436
def self.getGrid5000LegacyNameFor(model)
if @@new_gpu_names2old_ones[model]
return @@new_gpu_names2old_ones[model]
else
return model
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment