Skip to content

Commit

Permalink
Bump Scala version to 3.0.0; Bump ONNX-Scala, scalatest, sbt-dotty; A…
Browse files Browse the repository at this point in the history
…dd sbt-native-packager
  • Loading branch information
EmergentOrder committed May 14, 2021
1 parent 1f50f76 commit 3a62f4a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions ONNXScala/src/main/scala/ndscala/Bench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ val arrW1:Array[Float] = (Array.fill(10000000)(thisRandom.nextFloat)).map(_.toFl
val y = Tensor(arrY,"TensorTypeDenotation", "TensorShapeDenotation" ##: TSNil, 10000 #: 1000 #: SNil)
val x = Tensor(arrX,"TensorTypeDenotation","TensorShapeDenotation" ##: TSNil, 10000 #: 10000 #: SNil)

var w0:Tensor[Float, (TT, TD, TENKXTENK)] = (Tensor(arrW0,"TensorTypeDenotation","TensorShapeDenotation" ##: TSNil, 10000 #: 10000 #: SNil) - moreOnes) / more10ks
var w1:Tensor[Float, (TT, TD, TENKXONE)] = (Tensor(arrW1,"TensorTypeDenotation","TensorShapeDenotation" ##: TSNil, 10000 #: 1000 #: SNil) - ones ) /some10ks
val w0:Tensor[Float, (TT, TD, TENKXTENK)] = (Tensor(arrW0,"TensorTypeDenotation","TensorShapeDenotation" ##: TSNil, 10000 #: 10000 #: SNil) - moreOnes) / more10ks
val w1:Tensor[Float, (TT, TD, TENKXONE)] = (Tensor(arrW1,"TensorTypeDenotation","TensorShapeDenotation" ##: TSNil, 10000 #: 1000 #: SNil) - ones ) /some10ks


//Disabling broadcasting for ones may have slowed things down
Expand All @@ -64,9 +64,9 @@ def train = {

//Simulate in-place += op here

w0 = w0 + (((x.transpose).matmul(l1Delta))) //*moreLrs)
w1 = w1 + (((l1.transpose).matmul(l2Delta))) //*lrs)

val w0Upd = w0 + (((x.transpose).matmul(l1Delta))) //*moreLrs)
val w1Upd = w1 + (((l1.transpose).matmul(l2Delta))) //*lrs)
(w0Upd, w1Upd)
}
val before = System.nanoTime; for (j <- 0 until iters) {
val result = train
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import scala.xml.transform.{RewriteRule, RuleTransformer}

//val dottyVersion = dottyLatestNightlyBuild.get
val dottyVersion = "3.0.0-RC3"
val dottyVersion = "3.0.0"
val scala213Version = "2.13.5"

resolvers in Global += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
Expand All @@ -16,15 +16,15 @@ Global / concurrentRestrictions := Seq(
)

crossScalaVersions := Seq(dottyVersion, scala213Version)
lazy val scalaTest = ("org.scalatest" %% "scalatest" % "3.2.8")
lazy val scalaTest = ("org.scalatest" %% "scalatest" % "3.2.9")
lazy val core = (project in file("core"))
.settings(
name := "ndscala-core",
scalacOptions += "-Ymacro-annotations",
resolvers += Resolver.mavenLocal,
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
libraryDependencies += ("org.typelevel" %% "spire" % "0.17.0").withDottyCompat(dottyVersion),
libraryDependencies += "org.emergent-order" %% "onnx-scala" % "0.13.0",
libraryDependencies += "org.emergent-order" %% "onnx-scala" % "0.14.0",
//Local only
// libraryDependencies += "io.kjaer" % "tf-dotty-compiletime" % "0.0.0+134-f1f8d0ba+20201020-1123-SNAPSHOT",
// libraryDependencies += "io.kjaer" % "tf-dotty-compiletime_0.27" % "0.0.0+134-f1f8d0ba+20201020-1123-SNAPSHOT",
Expand All @@ -36,7 +36,7 @@ lazy val onnxscala = (project in file("ONNXScala"))
.settings(
name := "ndscala-onnx-scala",
libraryDependencies += ("org.typelevel" %% "spire" % "0.17.0").withDottyCompat(dottyVersion),
libraryDependencies += "org.emergent-order" %% "onnx-scala-backends" % "0.13.0",
libraryDependencies += "org.emergent-order" %% "onnx-scala-backends" % "0.14.0",
// libraryDependencies += "org.bytedeco" % "dnnl-platform" % "1.6.4-1.5.5-SNAPSHOT",
// libraryDependencies += "com.github.rssh" %% "dotty-cps-async" % "0.2.1-RC1",
libraryDependencies += scalaTest % Test,
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.0
sbt.version=1.5.2
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")

0 comments on commit 3a62f4a

Please sign in to comment.