Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fd64f5d4 authored by POUILLOUX Laurent's avatar POUILLOUX Laurent Committed by POUILLOUX Laurent
Browse files

[gpu] add performance and microarch in gpu information

parent a97219e0
Branches
No related tags found
1 merge request!542[gpu] add flops and microarch to gpu information
...@@ -207,6 +207,22 @@ class GPURef ...@@ -207,6 +207,22 @@ class GPURef
end end
end end
def self.get_microarch(model)
if @@gpus[model]
return @@gpus[model]['microarch']
else
raise "Fix me: #{model} is missing"
end
end
def self.get_performance(model)
if @@gpus[model]
return @@gpus[model]['performance']
else
raise "Fix me: #{model} is missing"
end
end
def self.model2shortname(model) def self.model2shortname(model)
if @@gpus[model] if @@gpus[model]
return @@gpus[model]['short_name'] return @@gpus[model]['short_name']
......
...@@ -763,12 +763,16 @@ end ...@@ -763,12 +763,16 @@ end
# This adds some extra pieces of information to the generated JSON: # This adds some extra pieces of information to the generated JSON:
# - the compute capability for Nvidia GPUs # - the compute capability for Nvidia GPUs
# - the number of cores for all GPUs # - the number of cores for all GPUs
# - the microarch
# - the theoretical flops performance
def add_gpu_information(h) def add_gpu_information(h)
h['sites'].each_pair do |_site_uid, site| h['sites'].each_pair do |_site_uid, site|
site.fetch('clusters', {}).each_pair do |_cluster_uid, cluster| site.fetch('clusters', {}).each_pair do |_cluster_uid, cluster|
cluster['nodes'].select { |_k, v| v['status'] != 'retired' }.each_pair do |_node_uid, node| cluster['nodes'].select { |_k, v| v['status'] != 'retired' }.each_pair do |_node_uid, node|
node['gpu_devices']&.each do |_, v| node['gpu_devices']&.each do |_, v|
v['cores'] = GPURef.get_cores(v['model']) v['cores'] = GPURef.get_cores(v['model'])
v['microarch'] = GPURef.get_microarch(v['model'])
v['performance'] = GPURef.get_performance(v['model'])
if v['vendor'] == 'Nvidia' if v['vendor'] == 'Nvidia'
v['compute_capability'] = GPURef.get_compute_capability(v['model']) v['compute_capability'] = GPURef.get_compute_capability(v['model'])
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment