"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "cb0da1cb9bb42285728273daaaceec21354673ee"
Unverified Commit a05db21b authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Check gpuIndices range for remote machine training service

parent b1a65978
......@@ -134,6 +134,13 @@ export class GPUScheduler {
rmMeta.gpuReservation = new Map<number, string>();
}
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}`);
rmMeta.gpuSummary.gpuInfos.forEach((gpuInfo: GPUInfo) => {
// if the GPU has active process, OR be reserved by a job,
......@@ -179,5 +186,4 @@ export class GPUScheduler {
}
};
}
}
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