".github/vscode:/vscode.git/clone" did not exist on "9055ccb3821757d315de0bc0358a927a043640f6"
Commit 34988d9b authored by demianzhang's avatar demianzhang Committed by chicm-ms
Browse files

Update gpuScheduler.ts (#1043)

parent 9974c602
...@@ -73,9 +73,14 @@ class GPUScheduler { ...@@ -73,9 +73,14 @@ class GPUScheduler {
public getAvailableGPUIndices(): number[] { public getAvailableGPUIndices(): number[] {
if (this.gpuSummary !== undefined) { if (this.gpuSummary !== undefined) {
if(process.platform === 'win32') {
return this.gpuSummary.gpuInfos.map((info: GPUInfo) => info.index);
}
else{
return this.gpuSummary.gpuInfos.filter((info: GPUInfo) => info.activeProcessNum === 0) return this.gpuSummary.gpuInfos.filter((info: GPUInfo) => info.activeProcessNum === 0)
.map((info: GPUInfo) => info.index); .map((info: GPUInfo) => info.index);
} }
}
return []; return [];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment