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
1d9b0a99
Commit
1d9b0a99
authored
Apr 19, 2019
by
chicm-ms
Committed by
SparkSnail
Apr 19, 2019
Browse files
Fix local gpu issue (#1000)
parent
b7ca02c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
src/nni_manager/training_service/local/localTrainingService.ts
...ni_manager/training_service/local/localTrainingService.ts
+5
-7
No files found.
src/nni_manager/training_service/local/localTrainingService.ts
View file @
1d9b0a99
...
...
@@ -369,7 +369,7 @@ class LocalTrainingService implements TrainingService {
private
getEnvironmentVariables
(
trialJobDetail
:
TrialJobDetail
,
resource
?
:
{
gpuIndices
:
number
[]
}):
{
key
:
string
;
value
:
string
}[]
{
resource
:
{
gpuIndices
:
number
[]
}):
{
key
:
string
;
value
:
string
}[]
{
const
envVariables
:
{
key
:
string
;
value
:
string
}[]
=
[
{
key
:
'
NNI_PLATFORM
'
,
value
:
'
local
'
},
{
key
:
'
NNI_SYS_DIR
'
,
value
:
trialJobDetail
.
workingDirectory
},
...
...
@@ -379,12 +379,10 @@ class LocalTrainingService implements TrainingService {
{
key
:
'
MULTI_PHASE
'
,
value
:
this
.
isMultiPhase
.
toString
()
}
];
if
(
resource
!==
undefined
&&
resource
.
gpuIndices
.
length
>
0
)
{
envVariables
.
push
({
key
:
'
CUDA_VISIBLE_DEVICES
'
,
value
:
this
.
gpuScheduler
===
undefined
?
''
:
resource
.
gpuIndices
.
join
(
'
,
'
)
});
}
envVariables
.
push
({
key
:
'
CUDA_VISIBLE_DEVICES
'
,
value
:
this
.
gpuScheduler
===
undefined
?
''
:
resource
.
gpuIndices
.
join
(
'
,
'
)
});
return
envVariables
;
}
...
...
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