Skip to content

Commit a0acf0b

Browse files
committed
Switch nd4j runtime according to setting key
1 parent acdde8c commit a0acf0b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

benchmarks/build.sbt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ enablePlugins(JmhPlugin)
22

33
libraryDependencies += "org.nd4j" % "nd4j-api" % "0.8.0"
44

5-
libraryDependencies += "org.nd4j" % "nd4j-cuda-8.0-platform" % "0.8.0"
5+
val nd4jRuntime = settingKey[String]("\"cuda-8.0\" to run benchmark on GPU, \"native\" to run benchmark on CPU.")
66

7-
libraryDependencies += "org.nd4j" % "nd4j-native-platform" % "0.8.0"
7+
nd4jRuntime in Global := "native"
8+
9+
libraryDependencies += {
10+
"org.nd4j" % s"nd4j-${nd4jRuntime.value}-platform" % "0.8.0"
11+
}
812

913
libraryDependencies += ("org.lwjgl" % "lwjgl" % "3.1.6").jar().classifier {
1014
import scala.util.Properties._

0 commit comments

Comments
 (0)