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
61a5b4bd
Commit
61a5b4bd
authored
4 years ago
by
Lucas Nussbaum
Browse files
Options
Downloads
Patches
Plain Diff
[dev/oar-prop] Improve assignment of GPU ids
parent
4cdc7880
No related branches found
No related tags found
1 merge request
!118
Oar-properties generator: improve assignment of GPU ids to deal with removal of GPUs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/refrepo/gen/oar-properties.rb
+7
-1
7 additions, 1 deletion
lib/refrepo/gen/oar-properties.rb
with
7 additions
and
1 deletion
lib/refrepo/gen/oar-properties.rb
+
7
−
1
View file @
61a5b4bd
...
@@ -1432,7 +1432,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
...
@@ -1432,7 +1432,13 @@ def extract_clusters_description(clusters, site_name, options, data_hierarchy, s
# id of the selected GPU in the node
# id of the selected GPU in the node
local_id
=
node_description
[
"gpu_devices"
].
values
.
index
(
selected_gpu
)
local_id
=
node_description
[
"gpu_devices"
].
values
.
index
(
selected_gpu
)
row
[
:gpu
]
=
phys_rsc_map
[
"gpu"
][
:current_ids
][
node_index0
*
gpu_count
+
local_id
]
# to assign the gpu number, just use the number of nodes and the number of GPUs per node
# sanity check: we must fall into the correct range
gpu
=
phys_rsc_map
[
"gpu"
][
:current_ids
].
min
+
node_index0
*
gpu_count
+
local_id
if
gpu
>
phys_rsc_map
[
"gpu"
][
:current_ids
].
max
raise
"Invalid GPU number for cluster
#{
cluster_name
}
"
end
row
[
:gpu
]
=
gpu
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'
]
...
...
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