Skip to content

Commit

Permalink
Update gpuScheduler.ts (microsoft#1043)
Browse files Browse the repository at this point in the history
  • Loading branch information
demianzhang authored and chicm-ms committed May 14, 2019
1 parent 9974c60 commit 34988d9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/nni_manager/training_service/local/gpuScheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ class GPUScheduler {

public getAvailableGPUIndices(): number[] {
if (this.gpuSummary !== undefined) {
return this.gpuSummary.gpuInfos.filter((info: GPUInfo) => info.activeProcessNum === 0)
.map((info: GPUInfo) => info.index);
if(process.platform === 'win32') {
return this.gpuSummary.gpuInfos.map((info: GPUInfo) => info.index);
}
else{
return this.gpuSummary.gpuInfos.filter((info: GPUInfo) => info.activeProcessNum === 0)
.map((info: GPUInfo) => info.index);
}
}

return [];
Expand Down

0 comments on commit 34988d9

Please sign in to comment.