Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Java Benchmark failure #13258

Merged
merged 4 commits into from
Nov 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scala-package/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.flattened-pom.xml
core/src/main/scala/org/apache/mxnet/NDArrayAPIBase.scala
core/src/main/scala/org/apache/mxnet/NDArrayBase.scala
core/src/main/scala/org/apache/mxnet/javaapi/NDArrayBase.scala
core/src/main/scala/org/apache/mxnet/SymbolAPIBase.scala
core/src/main/scala/org/apache/mxnet/SymbolBase.scala
examples/scripts/infer/images/
examples/scripts/infer/models/
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private static void printStatistics(long[] inferenceTimesRaw, String metricsPref

}

private static List<Context> getContext() {
private static List<Context> bindToDevice() {
List<Context> context = new ArrayList<Context>();
if (System.getenv().containsKey("SCALA_TEST_ON_GPU") &&
Integer.valueOf(System.getenv("SCALA_TEST_ON_GPU")) == 1) {
Expand Down Expand Up @@ -101,14 +101,7 @@ public static void main(String[] args) {
System.err.println("Model name not found! " + modelName);
System.exit(1);
}
List<Context> context = getContext();
if (System.getenv().containsKey("SCALA_TEST_ON_GPU") &&
Integer.valueOf(System.getenv("SCALA_TEST_ON_GPU")) == 1) {
context.add(Context.gpu());
} else {
context.add(Context.cpu());
}

List<Context> context = bindToDevice();
long[] result = new long[model.numRun];
model.preProcessModel(context);
if (runBatch) {
Expand Down