Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
reference-repository
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
grid5000
reference-repository
Commits
309d9cde
Commit
309d9cde
authored
Aug 07, 2019
by
RINGOT Patrice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[gen:oar-properties] use the new GPU representation
parent
e877a849
Pipeline
#90615
passed with stages
in 2 minutes and 39 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
44 deletions
+50
-44
lib/refrepo/gen/oar-properties.rb
lib/refrepo/gen/oar-properties.rb
+5
-3
lib/refrepo/gen/wiki/generators/site_hardware.rb
lib/refrepo/gen/wiki/generators/site_hardware.rb
+1
-41
lib/refrepo/gpu_ref.rb
lib/refrepo/gpu_ref.rb
+44
-0
No files found.
lib/refrepo/gen/oar-properties.rb
View file @
309d9cde
...
@@ -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
...
...
lib/refrepo/gen/wiki/generators/site_hardware.rb
View file @
309d9cde
# 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
...
...
lib/refrepo/gpu_ref.rb
0 → 100644
View file @
309d9cde
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment