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
f15a9b61
Unverified
Commit
f15a9b61
authored
Dec 11, 2020
by
SparkSnail
Committed by
GitHub
Dec 11, 2020
Browse files
Fix check gpu index logic in local mode (#3163)
parent
9710f170
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ts/nni_manager/training_service/local/gpuScheduler.ts
ts/nni_manager/training_service/local/gpuScheduler.ts
+2
-2
ts/nni_manager/training_service/local/localTrainingService.ts
...ni_manager/training_service/local/localTrainingService.ts
+2
-2
No files found.
ts/nni_manager/training_service/local/gpuScheduler.ts
View file @
f15a9b61
...
...
@@ -58,12 +58,12 @@ class GPUScheduler {
return
[];
}
public
getSystemGpuCount
():
number
{
public
getSystemGpuCount
():
number
|
undefined
{
if
(
this
.
gpuSummary
!==
undefined
)
{
return
this
.
gpuSummary
.
gpuCount
;
}
return
0
;
return
undefined
;
}
public
async
stop
():
Promise
<
void
>
{
...
...
ts/nni_manager/training_service/local/localTrainingService.ts
View file @
f15a9b61
...
...
@@ -435,8 +435,8 @@ class LocalTrainingService implements TrainingService {
}
private
checkSpecifiedGpuIndices
():
void
{
const
gpuCount
:
number
=
this
.
gpuScheduler
.
getSystemGpuCount
();
if
(
this
.
designatedGpuIndices
!==
undefined
)
{
const
gpuCount
:
number
|
undefined
=
this
.
gpuScheduler
.
getSystemGpuCount
();
if
(
this
.
designatedGpuIndices
!==
undefined
&&
gpuCount
!==
undefined
)
{
for
(
const
index
of
this
.
designatedGpuIndices
)
{
if
(
index
>=
gpuCount
)
{
throw
new
Error
(
`Specified GPU index not found:
${
index
}
`
);
...
...
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