You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/12/14 08:39:49 UTC

[GitHub] [tvm] dlexplorer opened a new issue #7104: Segmentation fault with ACL integration on onnx inception v1

dlexplorer opened a new issue #7104:
URL: https://github.com/apache/tvm/issues/7104


   The [ONNX inception v1 ](https://github.com/onnx/models/tree/master/vision/classification/inception_and_googlenet/inception_v1) been compiled with ACL integration crashes on the Android
   The same network been compiled through llvm works fine
   
   I tried also [onnx mobilenet v2](https://github.com/onnx/models/tree/master/vision/classification/mobilenet/model) and it works fine either through pure llvm approach or through ACL integration.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] dlexplorer edited a comment on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
dlexplorer edited a comment on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-747878618


   I double checked it and still confirm that loading inception v1 been compiled with ACL crashes on device and the version been compiled with pure llvm approach works well
   
   this is how I compiled network
   ```
   import argparse
   import sys
   import onnx
   import tvm
   from tvm import relay
   from tvm.contrib import ndk
   
   parser = argparse.ArgumentParser(description=
       "Converts and compiles ONNX model")
   required = parser.add_argument_group('required arguments')
   required.add_argument('-m', '--input_model', required=True, type=str, help="path to ONNX model")
   args = parser.parse_args()
   
   onnx_model = onnx.load(args.input_model)
   mod, params = relay.frontend.from_onnx(onnx_model)
   
   target = "llvm -model=snapdragon835 -mtriple=arm-linux-android -mattr=+neon"
   target_host = "llvm -mtriple=aarch64-linux-android-g++"
   
   # next two line defines the ACL/pure llvm diffirentiation
   from tvm.relay.op.contrib.arm_compute_lib import partition_for_arm_compute_lib
   mod = partition_for_arm_compute_lib(mod)
   
   with tvm.transform.PassContext(opt_level=3):
       lib = relay.build(mod, target=target, target_host=target_host, params=params)
   
   print(args.input_model + ".so")
   lib.export_library(args.input_model + ".so", ndk.create_shared)
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] Leo-arm commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
Leo-arm commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-745131720


   @d-smirnov 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] d-smirnov commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
d-smirnov commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-745356205


   Could you double-check that you have compiled the model properly, and it runs OK without ACL runtime, please?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] dlexplorer commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
dlexplorer commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-747878618


   I double checked it and still confirm that loading inception v1 been compiled with ACL crashes on device and the version been compiled with pure llvm approach works well
   
   this is how I compiled network
   ```
   import argparse
   import sys
   import onnx
   import tvm
   from tvm import relay
   from tvm.contrib import ndk
   
   parser = argparse.ArgumentParser(description=
       "Converts and compiles ONNX model")
   required = parser.add_argument_group('required arguments')
   required.add_argument('-m', '--input_model', required=True, type=str, help="path to ONNX model")
   args = parser.parse_args()
   
   onnx_model = onnx.load(args.input_model)
   mod, params = relay.frontend.from_onnx(onnx_model)
   
   target = "llvm -model=snapdragon835 -mtriple=arm-linux-android -mattr=+neon"
   target_host = "llvm -mtriple=aarch64-linux-android-g++"
   
   with tvm.transform.PassContext(opt_level=3):
       lib = relay.build(mod, target=target, target_host=target_host, params=params)
   
   print(args.input_model + ".so")
   lib.export_library(args.input_model + ".so", ndk.create_shared)
   ~
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] u99127 commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
u99127 commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-750482630


   What does the code for the version that "works" with native llvm look like ? Is the only difference the ACL partitioning ? Can I suggest trying out a tflite file or a model that is already known to work ? 
   
   BTW we are currently making this work with ACL 20.11 but all our testing has been on GNU/Linux with AArch64 file systems so  it might make sense to try and reduce the differences as much as possible first. 
   
   regards
   Ramana
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-745442320


   Let us move the discussion to https://discuss.tvm.apache.org/ once we confirmed the problem that is actionable, we can move back to issues


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] zhiics commented on issue #7104: Segmentation fault with ACL integration on onnx inception v1

Posted by GitBox <gi...@apache.org>.
zhiics commented on issue #7104:
URL: https://github.com/apache/tvm/issues/7104#issuecomment-744640934


   @mbaret @manupa-arm 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org