Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
grid5000
reference-repository
Commits
309d9cde
Commit
309d9cde
authored
5 years ago
by
RINGOT Patrice
Browse files
Options
Downloads
Patches
Plain Diff
[gen:oar-properties] use the new GPU representation
parent
e877a849
No related branches found
No related tags found
1 merge request
!22
Generators for the new GPU representation
Pipeline
#90615
passed
5 years ago
Stage: validate
Stage: generate
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/refrepo/gen/oar-properties.rb
+5
-3
5 additions, 3 deletions
lib/refrepo/gen/oar-properties.rb
lib/refrepo/gen/wiki/generators/site_hardware.rb
+1
-41
1 addition, 41 deletions
lib/refrepo/gen/wiki/generators/site_hardware.rb
lib/refrepo/gpu_ref.rb
+44
-0
44 additions, 0 deletions
lib/refrepo/gpu_ref.rb
with
50 additions
and
44 deletions
lib/refrepo/gen/oar-properties.rb
+
5
−
3
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
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/gen/wiki/generators/site_hardware.rb
+
1
−
41
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
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/gpu_ref.rb
0 → 100644
+
44
−
0
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment