Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Can't compile ion.c for hddl on Ubuntu 18.04 (5.3.0 kernel)

JoshDavisNC
Beginner
1,544 Views

When I try to run ${HDDL_INSTALL_DIR}/install_IVAD_VPU_dependencies.sh, I get the following errors. I am using Ubuntu 18.04 with the 5.3.0-26 kernel. Is there some step I missed?

make[2]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
  CC   /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/compat_ion.o
  CC   /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.o
/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.c:1233:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .fault = ion_vm_fault,
           ^~~~~~~~~~~~
/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.c:1233:11: note: (near initialization for ‘ion_vma_ops.fault’)
/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.c: In function ‘ion_debug_client_show’:
/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.c:920:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.o' failed
make[3]: *** [/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion/ion.o] Error 1
Makefile:1655: recipe for target '_module_/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion' failed
make[2]: *** [_module_/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'
Makefile:42: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_ion'
Makefile:68: recipe for target 'preinstall' failed
make: *** [preinstall] Error 2
Running install for component drv_vsc
if [[ "myd_vsc                20480  0" != "" ]]; then sudo rmmod myd_vsc; fi;
make[1]: Entering directory '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc'
rm -f *.o *.ko *.order *.mod.c *.symvers .*.cmd
rm -rf .tmp_versions
make[1]: Leaving directory '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc'
make[1]: Entering directory '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc'
make -C /lib/modules/`uname -r`/build M=$PWD ccflags-y+=
make[2]: Entering directory '/usr/src/linux-headers-5.3.0-26-generic'
  CC   /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc/myd_vsc.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc/myd_vsc.mod.o
  LD   /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc/myd_vsc.ko
make[2]: Leaving directory '/usr/src/linux-headers-5.3.0-26-generic'
make[1]: Leaving directory '/opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/external/hddl/drivers/drv_vsc'
mkdir -p /lib/modules/5.3.0-26-generic/kernel/drivers/myd/
cp myd_vsc.ko /lib/modules/5.3.0-26-generic/kernel/drivers/myd/myd_vsc.ko
   Driver myd_vsc.ko is installed to /lib/modules/5.3.0-26-generic/kernel/drivers/myd/myd_vsc.ko 
sudo depmod
filename:       /lib/modules/5.3.0-26-generic/kernel/drivers/myd/myd_vsc.ko
license:        GPL
srcversion:     43AE0E7C58AE1F604AA1D61
alias:          usb:v03E7pF63Bd*dc*dsc*dp*ic*isc*ip*in*
depends:        
retpoline:      Y
name:           myd_vsc
vermagic:       5.3.0-26-generic SMP mod_unload 
mkdir -p /etc/modules-load.d/
   /etc/modules-load.d/myd_vsc.conf is created for auto-load at boot time 
sudo ./setup.sh install myd_ion fail
0 Kudos
8 Replies
JoshDavisNC
Beginner
1,544 Views

I found the problem. Somewhere between the 4.11.0 and 5.3.0 kernels, the type of vm_operations_struct.fault changed from int to vm_fault_t (typedef for unsigned int). Adding the two bolded lines below at ion.c:1164 fixed the error.

#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
static int ion_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0)
static vm_fault_t ion_vm_fault(struct vm_fault *vmf)
#else
static int ion_vm_fault(struct vm_fault *vmf)
#endif
0 Kudos
JoshDavisNC
Beginner
1,544 Views

This got it to compile, but it's not working. The hddldaemon fails with a SIGSEGV and dumps core. The error from the crash report is "Disassembly: => 0x20:   Cannot access memory at address 0x20". I can attach the crash report if that's helpful.

Prior to the core dump, I see these errors, not sure if related:

Failed to use HDDL BSL configure file in ${HDDL_INSTALL_DIR}/config,
it may not exist or format is wrong
Error is:	BSL_ERROR_NO_DEVICE_FOUND

Any ideas how I can fix the BSL_ERROR_NO_DEVICE_FOUND error and how I can get the hddldeamon to run?

0 Kudos
JoshDavisNC
Beginner
1,544 Views

Any ideas?

0 Kudos
JesusE_Intel
Moderator
1,544 Views

Hi JoshDavisNC,

Please attach the entire log and I can take a look. 

  • Which HDDL card are you using?
  • Can you confirm the ${HDDL_INSTALL_DIR}/config/bsl.json exists?

Regards,

Jesus

0 Kudos
JoshDavisNC
Beginner
1,544 Views

Thank you for looking at this.

Jesus E. (Intel) wrote:
Which HDDL card are you using?

Mustang-V100-MX4-R10

Jesus E. (Intel) wrote:
Can you confirm the ${HDDL_INSTALL_DIR}/config/bsl.json exists

It exists, and is attached here as bsl.json_.txt.

Jesus E. (Intel) wrote:
Please attach the entire log and I can take a look.

Attached is the output from running demo_squeezenet_download_convert_run.sh -d HDDL from the demo folder. The process crashes with SYSSEGV "Disassembly: => 0x20:   Cannot access memory at address 0x20" after the last line of output. The crash report is also attached.

Edited to add: Everything works fine if I use GPU or MYRIAD as the device.

0 Kudos
JesusE_Intel
Moderator
1,544 Views

Hi JoshDavisNC,

I tested the HDDL plugin on Ubuntu 18.04 with Kernel 5.3 using a Mustang-V100-MX8 and saw the same error you are running into. Using the same system with Kernel 4.15 did not have this issue. I will check with the development team, however, it's likely Kernel 5.3 is not supported by the HDDL plugin.

Regards,

Jesus

0 Kudos
JesusE_Intel
Moderator
1,544 Views

Hi JoshDavisNC,

Apologize for the delay in my response, the error is caused by a compatibility issue with kernel version 5.3. This should be fixed in the next release, as a workaround please try disabling the ION driver.

sudo mv /lib/modules/$(uname -r)/kernel/drivers/myd/myd_ion.ko  /lib/modules/$(uname -r)/kernel/drivers/myd/myd_ion.ko.backup

sudo depmod -a

Regards,

Jesus

 

0 Kudos
NeuronalChips__The
1,544 Views

it does not seem to have been fixed in V3 either but got it up and running by using

1sudo mv /lib/modules/$(uname -r)/kernel/drivers/myd/myd_ion.ko  /lib/modules/$(uname -r)/kernel/drivers/myd/myd_ion.ko.backup

3sudo depmod -a

 

we would like to know if pytorch  which are local   can be imported and  converted  in DL

which is not in the Import a local that is a which is not in the

Intel Open Model Zoo. folder

 

ref If you cannot find a proper model in the table, you can import a local or an Intel Open Model Zoo model.

 

Raw files and hdf5

0 Kudos
Reply