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
27d6393e
Commit
27d6393e
authored
3 years ago
by
RINGOT Patrice
Browse files
Options
Downloads
Patches
Plain Diff
[gpumem] wip
parent
df3196de
No related branches found
No related tags found
No related merge requests found
Pipeline
#305861
failed
3 years ago
Stage: validate
Stage: generate
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/oar-properties.rb
+7
-0
7 additions, 0 deletions
lib/refrepo/gen/oar-properties.rb
with
7 additions
and
0 deletions
lib/refrepo/gen/oar-properties.rb
+
7
−
0
View file @
27d6393e
...
@@ -10,6 +10,7 @@ require 'refrepo/gpu_ref'
...
@@ -10,6 +10,7 @@ require 'refrepo/gpu_ref'
class
MissingProperty
<
StandardError
;
end
class
MissingProperty
<
StandardError
;
end
MiB
=
1024
**
2
MiB
=
1024
**
2
GiB
=
1024
**
3
############################################
############################################
# Functions related to the "TABLE" operation
# Functions related to the "TABLE" operation
...
@@ -247,6 +248,7 @@ def export_rows_as_oar_command(generated_hierarchy, site_name, site_properties,
...
@@ -247,6 +248,7 @@ def export_rows_as_oar_command(generated_hierarchy, site_name, site_properties,
gpudevice
=
oar_ressource_row
[
:gpudevice
].
to_s
gpudevice
=
oar_ressource_row
[
:gpudevice
].
to_s
gpumodel
=
oar_ressource_row
[
:gpumodel
].
to_s
gpumodel
=
oar_ressource_row
[
:gpumodel
].
to_s
gpudevicepath
=
oar_ressource_row
[
:gpudevicepath
].
to_s
gpudevicepath
=
oar_ressource_row
[
:gpudevicepath
].
to_s
memgpu
=
oar_ressource_row
[
:memgpu
].
to_i
resource_id
=
oar_ressource_row
[
:resource_id
]
resource_id
=
oar_ressource_row
[
:resource_id
]
if
resource_id
==
-
1
or
resource_id
.
nil?
if
resource_id
==
-
1
or
resource_id
.
nil?
...
@@ -433,9 +435,11 @@ def get_ref_node_properties_internal(cluster_uid, cluster, node_uid, node)
...
@@ -433,9 +435,11 @@ def get_ref_node_properties_internal(cluster_uid, cluster, node_uid, node)
end
end
h
[
'gpu_model'
]
=
models
.
first
h
[
'gpu_model'
]
=
models
.
first
h
[
'gpu_count'
]
=
node
[
'gpu_devices'
].
length
h
[
'gpu_count'
]
=
node
[
'gpu_devices'
].
length
h
[
'memgpu'
]
=
models
.
first
[
'memory'
]
/
GiB
else
else
h
[
'gpu_model'
]
=
''
h
[
'gpu_model'
]
=
''
h
[
'gpu_count'
]
=
0
h
[
'gpu_count'
]
=
0
h
[
'memgpu'
]
=
0
end
end
if
node
.
key?
(
'exotic'
)
if
node
.
key?
(
'exotic'
)
...
@@ -705,6 +709,7 @@ def ignore_default_keys()
...
@@ -705,6 +709,7 @@ def ignore_default_keys()
"host"
,
# This property was created by 'oar_resources_add'
"host"
,
# This property was created by 'oar_resources_add'
"gpudevice"
,
# New property taken into account by the new generator
"gpudevice"
,
# New property taken into account by the new generator
"gpu"
,
# New property taken into account by the new generator
"gpu"
,
# New property taken into account by the new generator
"memgpu"
,
# ?
"cpuset"
,
"cpuset"
,
"desktop_computing"
,
"desktop_computing"
,
"drain"
,
"drain"
,
...
@@ -1300,6 +1305,7 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
...
@@ -1300,6 +1305,7 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
:cpuset
=>
nil
,
:cpuset
=>
nil
,
:gpu
=>
nil
,
:gpu
=>
nil
,
:gpudevice
=>
nil
,
:gpudevice
=>
nil
,
:memgpu
=>
nil
,
:gpudevicepath
=>
nil
,
:gpudevicepath
=>
nil
,
:cpumodel
=>
nil
,
:cpumodel
=>
nil
,
:gpumodel
=>
nil
,
:gpumodel
=>
nil
,
...
@@ -1358,6 +1364,7 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
...
@@ -1358,6 +1364,7 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
row
[
:gpudevice
]
=
local_id
row
[
:gpudevice
]
=
local_id
row
[
:gpudevicepath
]
=
selected_gpu
[
'device'
]
row
[
:gpudevicepath
]
=
selected_gpu
[
'device'
]
row
[
:gpumodel
]
=
selected_gpu
[
'model'
]
row
[
:gpumodel
]
=
selected_gpu
[
'model'
]
row
[
:memgpu
]
=
selected_gpu
[
'memory'
]
end
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