Deploy opencl on arm device with PowerVR Rogue GPU

Here is the steps i have done.

Please Note i tried this steps on Nvidia GPU on PC Desktop and it worked very well.

  • I generated the library files using
    target=‘opencl’
    target_host=‘llvm -mtriple=aarch64-poky-linux -mcpu=cortex-a57’
    with compiler when exporting the library
    gcc-linaro-5.2-2015.11-2-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++
    using vienna opencl

my Make file
‘’’

Makefile Example to deploy TVM modules.

TVM_ROOT=$(shell cd …/…; pwd)
NNVM_PATH=nnvm
DMLC_CORE=${TVM_ROOT}/dmlc-core

xCXX=xxxxx/tvm_test/sources/xtoolchain/gcc-linaro-5.2-2015.11-2-x86_64_aarch64-linux-gnu/bin$

PKG_CFLAGS = -std=c++11 -O2 -fPIC
-I${TVM_ROOT}/include
-I${DMLC_CORE}/include
-I${TVM_ROOT}/dlpack/include
-I/xxxxxxx/tvm/apps/ocl_mob_arm_deploy/rogue/usr/include/

PKG_LDFLAGS = -L${TVM_ROOT}/lib -ldl -lpthread -Llib

.PHONY: clean all

all: lib/ocl_mob_arm_deploy

Build rule for all in one TVM package library

lib/libtvm_runtime_pack.o: tvm_runtime_pack.cc
@mkdir -p $(@D)
$(xCXX) -c $(PKG_CFLAGS) -o $@ $^

Deploy using the all in one TVM package library

lib/ocl_mob_arm_deploy: ocl_mob_arm_deploy.cc lib/ocl_mob_deploy_arm.so lib/libtvm_runtime_pack.o lib/libviennacl.so
echo ${TVM_ROOT}
@mkdir -p $(@D)
$(xCXX) $(PKG_CFLAGS) -o $@ $^ $(PKG_LDFLAGS) -lviennacl -lOpenCL
‘’’

IT Gives me Segmentation fault in the first operation in the network.
Any help please

Could you try extracting few debug details from deploy sample source to point which runtime API caused segfault ?

Hello @srkreddy1238,

No i cannot …

But what i can make sure of it that it give me segfault in the vector of functions of the network
in the first convolution operation.