Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
a05db21b
Unverified
Commit
a05db21b
authored
Apr 25, 2019
by
chicm-ms
Committed by
GitHub
Apr 25, 2019
Browse files
Check gpuIndices range for remote machine training service
parent
b1a65978
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/nni_manager/training_service/remote_machine/gpuScheduler.ts
...i_manager/training_service/remote_machine/gpuScheduler.ts
+7
-1
No files found.
src/nni_manager/training_service/remote_machine/gpuScheduler.ts
View file @
a05db21b
...
@@ -134,6 +134,13 @@ export class GPUScheduler {
...
@@ -134,6 +134,13 @@ export class GPUScheduler {
rmMeta
.
gpuReservation
=
new
Map
<
number
,
string
>
();
rmMeta
.
gpuReservation
=
new
Map
<
number
,
string
>
();
}
}
const
designatedGpuIndices
:
Set
<
number
>
|
undefined
=
parseGpuIndices
(
rmMeta
.
gpuIndices
);
const
designatedGpuIndices
:
Set
<
number
>
|
undefined
=
parseGpuIndices
(
rmMeta
.
gpuIndices
);
if
(
designatedGpuIndices
!==
undefined
)
{
for
(
const
gpuIndex
of
designatedGpuIndices
)
{
if
(
gpuIndex
>=
rmMeta
.
gpuSummary
.
gpuCount
)
{
throw
new
Error
(
`Specified GPU index not found:
${
gpuIndex
}
`
);
}
}
}
this
.
log
.
debug
(
`designated gpu indices:
${
designatedGpuIndices
}
`
);
this
.
log
.
debug
(
`designated gpu indices:
${
designatedGpuIndices
}
`
);
rmMeta
.
gpuSummary
.
gpuInfos
.
forEach
((
gpuInfo
:
GPUInfo
)
=>
{
rmMeta
.
gpuSummary
.
gpuInfos
.
forEach
((
gpuInfo
:
GPUInfo
)
=>
{
// if the GPU has active process, OR be reserved by a job,
// if the GPU has active process, OR be reserved by a job,
...
@@ -179,5 +186,4 @@ export class GPUScheduler {
...
@@ -179,5 +186,4 @@ export class GPUScheduler {
}
}
};
};
}
}
}
}
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