Browse Source

Merge pull request '支持智算集群NPU多卡训练' (#2675) from grampus_multi_parallel into V20220801.patch

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2675
tags/v1.22.8.1
ychao_1983 3 years ago
parent
commit
35f3ad271a
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      routers/repo/grampus.go

+ 7
- 1
routers/repo/grampus.go View File

@@ -787,7 +787,13 @@ func generateCommand(repoName, processorType, codeRemotePath, dataRemotePath, bo
}
}

commandCode := "cd " + workDir + "code/" + strings.ToLower(repoName) + ";python " + bootFile + paramCode + ";"
var commandCode string
if processorType == grampus.ProcessorTypeNPU {
commandCode = "/bin/bash /home/work/run_train_for_openi.sh " + workDir + "code/" + strings.ToLower(repoName) + "/" + bootFile + " /tmp/log/train.log" + paramCode + ";"
} else if processorType == grampus.ProcessorTypeGPU {
commandCode = "cd " + workDir + "code/" + strings.ToLower(repoName) + ";python " + bootFile + paramCode + ";"
}

command += commandCode

//get exec result


Loading…
Cancel
Save