Skip to content

Commit

Permalink
Merge pull request #8 from a645162/dev
Browse files Browse the repository at this point in the history
fix(GpuTask): Fix single GPU bug
  • Loading branch information
a645162 authored Nov 7, 2024
2 parents 955d52c + 0929a8e commit b0acb0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,23 @@ class GpuTaskController {
// Notify
val machineConfig = MachineConfig.getMachineByNameEng(gpuTaskInfo.serverNameEng)

println(
"Receive task from nvi-notify" +
" ${gpuTaskInfo.taskType}" +
" Project:${gpuTaskInfo.projectName}" +
" User:${gpuTaskInfo.taskUser}"
)

val gpuTaskNotify = GpuTaskNotify(
gpuTaskInfo = gpuTaskInfo,
machineConfig = machineConfig
)

val isMultiCard = gpuTaskInfo.multiDeviceWorldSize > 1

if (
!gpuTaskInfo.isDebugMode && (
gpuTaskInfo.multiDeviceWorldSize > 1 &&
gpuTaskInfo.multiDeviceLocalRank == 0
)
!gpuTaskInfo.isDebugMode &&
(!isMultiCard || gpuTaskInfo.multiDeviceLocalRank == 0)
) {
gpuTaskNotify.sendTaskMessage()
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spring:
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/group_center?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://localhost:15096/group_center?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
type: com.alibaba.druid.pool.DruidDataSource

sql:
Expand Down

0 comments on commit b0acb0b

Please sign in to comment.