Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
minmingzhu committed Sep 10, 2024
1 parent 04731dd commit 51f03c8
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions mllib-dal/src/main/scala/com/intel/oap/mllib/OneCCL.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ object OneCCL extends Logging {
s"commSize, ${cclParam.getCommSize}, rankId: ${cclParam.getRankId}")
}

// Run on Executor
def setExecutorEnv(key: String, value: String): Unit = {
setEnv(key, value)
// Set specified by values for each Executor
def setAffinityMask(rankId: String): Unit = {
setEnv("ZE_AFFINITY_MASK", rankId)
}

// Run on Executor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class RandomForestClassifierDALImpl(val uid: String,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class KMeansDALImpl(var nClusters: Int,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class PCADALImpl(val k: Int,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class LinearRegressionDALImpl( val fitIntercept: Boolean,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class RandomForestRegressorDALImpl(val uid: String,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CorrelationDALImpl(
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SummarizerDALImpl(val executorNum: Int,
} else {
null
}
OneCCL.setExecutorEnv("ZE_AFFINITY_MASK", gpuIndices(0).toString())
OneCCL.setAffinityMask(gpuIndices(0).toString())
Iterator.empty
}.count()

Expand Down

0 comments on commit 51f03c8

Please sign in to comment.