Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
EmergentOrder committed Oct 22, 2021
1 parent 895fecf commit 5d56b13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions backends/.jvm/src/main/scala/ORTTensorUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ object ORTTensorUtils {

value.getByteBuffer.array().map(x => if (x == 1) true else false)
}
case ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING => ??? //TODO
case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 => ??? //TODO, Newly supported in ORT Java 1.9.x
case ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 |
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 | ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 |
ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16 | ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64 |
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128 | ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 => ??? //Unsupported
}
value.close()
arr.asInstanceOf[Array[T]]
Expand Down
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ lazy val proto = (crossProject(JSPlatform, JVMPlatform)
libraryDependencies -= ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion),
libraryDependencies += ("com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion)
.cross(CrossVersion.for3Use2_13),
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
Compile / PB.targets := Seq(
scalapb.gen() -> (Compile / sourceManaged).value
),
// The trick is in this line:
PB.protoSources in Compile := Seq(file("proto/src/main/protobuf"))
Compile / PB.protoSources := Seq(file("proto/src/main/protobuf"))
)

lazy val backends = (crossProject(JVMPlatform, JSPlatform)
Expand All @@ -63,7 +63,7 @@ lazy val backends = (crossProject(JVMPlatform, JSPlatform)
)
.jsSettings(
scalaJSUseMainModuleInitializer := true, //, //Testing
npmDependencies in Compile += "onnxruntime-web" -> "1.9.0"
Compile / npmDependencies += "onnxruntime-web" -> "1.9.0"
)
.jsConfigure { project => project.enablePlugins(ScalablyTypedConverterPlugin) }

Expand Down Expand Up @@ -102,7 +102,7 @@ lazy val docs = (crossProject(JVMPlatform)
)
*/

skip in publish := true
publish / skip := true

lazy val sonatypeSettings = Seq(
sonatypeProfileName := "org.emergent-order",
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/OpToONNXBytesConverter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ trait OpToONNXBytesConverter extends AutoCloseable {
t = Some(
TensorProto()
.withDataType(TensorProto.DataType.FLOAT.value)
.withDims(x.shape.map(_.toLong))
.withDims(ArraySeq.unsafeWrapArray(x.shape.map(_.toLong)))
.withFloatData(ArraySeq.unsafeWrapArray(x.data))
)
)
Expand Down

0 comments on commit 5d56b13

Please sign in to comment.