Merge "Fix errors running on Mac OS" am: f8ecf74ab0 am: acaaecd920
Original change: https://android-review.googlesource.com/c/platform/test/mlts/benchmark/+/1396547
Change-Id: I80bd25f18c713e4fa91d22d5012620e616577d83
diff --git a/dogfood/src/com/android/nn/dogfood/BenchmarkJobService.java b/dogfood/src/com/android/nn/dogfood/BenchmarkJobService.java
index 0ce2fe8..a2d485f 100644
--- a/dogfood/src/com/android/nn/dogfood/BenchmarkJobService.java
+++ b/dogfood/src/com/android/nn/dogfood/BenchmarkJobService.java
@@ -122,7 +122,7 @@
mNotificationManager = NotificationManagerCompat.from(this);
NotificationChannel channel =
new NotificationChannel(CHANNEL_ID, "Default", NotificationManager.IMPORTANCE_LOW);
- // mNotificationManager.createNotificationChannel(channel);
+ mNotificationManager.createNotificationChannel(channel);
mNotificationManager = NotificationManagerCompat.from(this);
String title = "NN API Dogfood";
String msg = String.format("Background test %d of %d is running", getNumRuns(), NUM_RUNS);
diff --git a/tools/tensor_utils.py b/tools/tensor_utils.py
index 06b5251..1200195 100644
--- a/tools/tensor_utils.py
+++ b/tools/tensor_utils.py
@@ -251,7 +251,7 @@
return diff
diff = diff.astype(float)
cpu_tensor = cpu_tensor.astype(float)
- # Divide by max so the relative error range is conveniently [-1, 1]
+ # Devide by max so the relative error range is conveniently [-1, 1]
max_cpu_nnapi_tensor = np.maximum(np.abs(cpu_tensor), np.abs(nnapi_tensor))
relative_diff = np.divide(diff, max_cpu_nnapi_tensor, out=np.zeros_like(diff),
where=max_cpu_nnapi_tensor>0)