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

Custom kernels for VPU (NCS2).

SergeyMalykhin
Beginner
231 Views

Hi,

I faced an issue with custom kernel implementation for VPU (NCS2) - probably you can advise anything.

 

I'm using Ubuntu 20.4 and OpenVINO 2021.4.689 (latest version) - demos running fine on NCS2.

 

But when I'm building custom kernel from github (https://github.com/openvinotoolkit/openvino/tree/master/inference-engine/src/vpu/custom_kernels) with OpenCL compiler I have issues:
Could not find first stage linker script! Check CMake configuration for SHAVE_LDSCRIPT_DIR or override it as an environment variable.
Could not find second stage linker script! Check CMake configuration for SHAVE_LDSCRIPT_DIR or override it as an environment variable.

 

Build command is:
clc st.cl -o st.bin -d ma2x8x

 

FYI - I installed everything as in docs - https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_linux.html
and prepared for custom kernels implementation as here - https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_Extensibility_DG_VPU_Kernel.html

 

Please let me know if it's some known issue or probably I missed something.

 

Best regards,
Sergey

0 Kudos
1 Solution
JesusE_Intel
Moderator
150 Views

Hi SergeyMalykhin,

 

Could you try sourcing the cltools_setenv.sh script under /opt/intel/openvino_2021/deployment_tools/tools/cl_compiler/bin/?

 

I was able to compile st.cl without any issues after sourcing the cltools_setenv.sh script.

 

source /opt/intel/openvino_2021/bin/setupvars.sh 

cd /opt/intel/openvino_2021/deployment_tools/tools/cl_compiler/bin/

source cltools_setenv.sh ma2x8x

./clc ~/Downloads/custom_kernels/st.cl -o ~/Downloads/custom_kernels/st.bin -d ma2x8x

 

Regards,

Jesus

 

View solution in original post

4 Replies
Peh_Intel
Moderator
196 Views

Hi Sergey,


Thanks for reaching out to us.


We are still investigating this issue and will get back to you at the earliest.



Regards,

Peh


JesusE_Intel
Moderator
151 Views

Hi SergeyMalykhin,

 

Could you try sourcing the cltools_setenv.sh script under /opt/intel/openvino_2021/deployment_tools/tools/cl_compiler/bin/?

 

I was able to compile st.cl without any issues after sourcing the cltools_setenv.sh script.

 

source /opt/intel/openvino_2021/bin/setupvars.sh 

cd /opt/intel/openvino_2021/deployment_tools/tools/cl_compiler/bin/

source cltools_setenv.sh ma2x8x

./clc ~/Downloads/custom_kernels/st.cl -o ~/Downloads/custom_kernels/st.bin -d ma2x8x

 

Regards,

Jesus

 

View solution in original post

SergeyMalykhin
Beginner
125 Views

Hi Jesus,

 

Thanks. That worked for me.

 

Best regards,

Sergey

Peh_Intel
Moderator
108 Views

Hello Sergey,


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question. 



Regards,

Peh


Reply