apps/android_deploy not work #1567


#1

Here is adb logcat:

08-08 10:56:08.917 1238 4243 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=ml.dmlc.tvm.android.demo/.MainActivity bnds=[325,604][493,772] (has extras)} from uid 10020 on display 0
08-08 10:56:08.957 1238 5975 I ActivityManager: Start proc 5956:ml.dmlc.tvm.android.demo/u0a358 for activity ml.dmlc.tvm.android.demo/.MainActivity
08-08 10:56:08.980 4521 8551 D WtProcessController: set foreground process size 1 pid:5956pacakgeName:ml.dmlc.tvm.android.demo
08-08 10:56:08.980 4521 8551 W WtProcessStrategy: {WhetstonePackageInfo#PacakgeName:ml.dmlc.tvm.android.demo uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:1073747008,0x40001440 [,TRIMHEAPS,SOFT_RESET,FLAG_DEAL_SCHEDULE] Type:0[] }not support ZRAM
08-08 10:56:08.980 5933 7332 I octvm_power: power mode [normal] start 1533696968
08-08 10:56:08.981 5933 7332 I octvm_power: Action: set_lcd_mode(default) for [foreground_change]
08-08 10:56:08.981 5933 7332 I octvm_drv: common drv: platform_set_lcd_mode -> platform not support
08-08 10:56:08.981 5933 7332 I octvm_power: onPowerModeChanged[normal] called
08-08 10:56:09.215 1238 1308 I ActivityManager: Displayed ml.dmlc.tvm.android.demo/.MainActivity: +269ms
08-08 10:56:09.263 1238 1308 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{41e6be9 u0 ml.dmlc.tvm.android.demo/.MainActivity t35190} time:44253155
08-08 10:56:10.293 5956 5977 W System.err: Try loading tvm4j from native path.
08-08 10:56:10.295 5956 5977 W System.err: Try loading tvm4j-linux-x86_64 from native path.
08-08 10:56:10.296 5956 5977 W System.err: Attempting to load libtvm4j.so
08-08 10:56:10.302 5956 5977 W System.err: [WARN] Couldn’t find native library tvm4j.
08-08 10:56:10.302 5956 5977 W System.err: java.lang.UnsatisfiedLinkError: Couldn’t find the resource libtvm4j.so
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.NativeLibraryLoader.extractResourceFileToTempDir(NativeLibraryLoader.java:127)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:87)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Base.(Base.java:73)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Function.listGlobalFuncNames(Function.java:52)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Function.getFunction(Function.java:38)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Module.getApi(Module.java:41)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Module.load(Module.java:139)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.Module.load(Module.java:145)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.android.demo.MainActivity$LoadModleAsyncTask.doInBackground(MainActivity.java:184)
08-08 10:56:10.302 5956 5977 W System.err: at ml.dmlc.tvm.android.demo.MainActivity$LoadModleAsyncTask.doInBackground(MainActivity.java:124)
08-08 10:56:10.302 5956 5977 W System.err: Try to load tvm4j (runtime packed version) …
08-08 10:56:10.311 5956 5977 W System.err: libtvm4j loads successfully.
08-08 10:56:20.135 5933 5933 I octvm_power: power mode [enhanceUI] start 1533696980
08-08 10:56:20.135 5933 5933 I octvm_power: Action: set_lcd_mode(en) for [foreground_change]
08-08 10:56:20.135 5933 5933 I octvm_drv: common drv: platform_set_lcd_mode -> platform not support
08-08 10:56:20.135 5933 5933 I octvm_power: onPowerModeChanged[enhanceUI] called
08-08 10:56:24.064 4521 8551 D WtProcessController: set foreground process size 1 pid:5956pacakgeName:ml.dmlc.tvm.android.demo
08-08 10:56:24.064 4521 8551 W WtProcessStrategy: {WhetstonePackageInfo#PacakgeName:ml.dmlc.tvm.android.demo uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:1073747008,0x40001440 [,TRIMHEAPS,SOFT_RESET,FLAG_DEAL_SCHEDULE] Type:0[] }not support ZRAM
08-08 10:56:24.064 5933 7332 I octvm_power: power mode [normal] start 1533696984
08-08 10:56:24.064 5933 7332 I octvm_power: Action: set_lcd_mode(default) for [foreground_change]
08-08 10:56:24.064 5933 7332 I octvm_drv: common drv: platform_set_lcd_mode -> platform not support
08-08 10:56:24.064 5933 7332 I octvm_power: onPowerModeChanged[normal] called
08-08 10:56:24.885 1238 1308 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{41e6be9 u0 ml.dmlc.tvm.android.demo/.MainActivity t35190} time:44268777
08-08 10:56:31.611 5956 6005 E AndroidRuntime: Process: ml.dmlc.tvm.android.demo, PID: 5956
08-08 10:56:31.611 5956 6005 E AndroidRuntime: at ml.dmlc.tvm.android.demo.MainActivity$ModelRunAsyncTask.doInBackground(MainActivity.java:323)
08-08 10:56:31.611 5956 6005 E AndroidRuntime: at ml.dmlc.tvm.android.demo.MainActivity$ModelRunAsyncTask.doInBackground(MainActivity.java:229)
08-08 10:56:31.613 5933 7328 I octvm_klo: klo lock
08-08 10:56:31.615 1238 4589 W ActivityManager: Force finishing activity ml.dmlc.tvm.android.demo/.MainActivity
08-08 10:56:31.637 5933 7328 I octvm_klo: get wanted event[mask:128, name:data_app_crash@1533696991628.txt] from the watchset
08-08 10:56:31.637 5933 7328 I octvm_klo: start gathering logcat log…
08-08 10:56:31.638 5933 7328 E octvm_klo: read: Unexpected EOF!
08-08 10:56:31.638 5933 7328 I octvm_klo: gathering logcat log done
08-08 10:56:31.638 5933 7328 I octvm_klo: klo unlock
08-08 10:56:31.872 1238 5985 I WindowState: WIN DEATH: Window{f9cec8a u0 ml.dmlc.tvm.android.demo/ml.dmlc.tvm.android.demo.MainActivity}
08-08 10:56:31.876 1238 5973 I WindowState: WIN DEATH: Window{736811e u0 ml.dmlc.tvm.android.demo/ml.dmlc.tvm.android.demo.MainActivity}
08-08 10:56:31.890 1238 4242 I ActivityManager: Process ml.dmlc.tvm.android.demo (pid 5956) has died
08-08 10:56:31.903 5933 5933 I octvm_power: power mode [home] start 1533696991
08-08 10:56:31.903 5933 5933 I octvm_power: Action: set_lcd_mode(default) for [foreground_change]
08-08 10:56:31.903 5933 5933 I octvm_drv: common drv: platform_set_lcd_mode -> platform not support
08-08 10:56:31.903 5933 5933 I octvm_power: onPowerModeChanged[home] called
08-08 10:58:23.948 5933 7328 I octvm_klo: screen_toggled event:screen_state:0
08-08 10:58:23.948 5933 7328 I octvm_klo: last_screen_toggle_on_time:1533696858, this toggle:1533697103
08-08 10:58:23.949 5933 7332 I octvm_power: power mode [idle] start 1533697103
08-08 10:58:23.950 5933 7332 I octvm_power: onPowerModeChanged[idle] called
08-08 10:58:53.964 5933 5933 I octvm_power: handle event trigger screen_off_timeout_30


#2

A few steps for debugging this case:
You can filter logical (likely by grepping for ‘tvm’) so we can ignore irrelevant debug messages.

Can you run this workload using the RPC app? This would suggest that there is something wrong with the build process for the deploy app.

Can you also provide us some information on what the hardware (e.g., SoC) and software (e.g., android version, backend(s) used) are in this cas?


#3

android_deploy use to load pre-compiled library on android application, due to mismatch with tvm code application cause exception while evaluate process.

Working on the same problem soon will provide solution with update tutorial part, sorry for the inconvenience.


#4

root cause : native
├── libtvm4j.so
└── libtvm_runtime.so are linux-x86_64.

but "deploy_lib_cpu.so deploy_lib_opencl.so " are ARM.

Thanks,
Haijun


#5

hi ,i don not understand how do you solve this error? thanks