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.

Custom Ops

idata
Employee
1,026 Views

Is it possible to run custom ops written in C on the NCS? For example, a custom pooling operation.

0 Kudos
6 Replies
idata
Employee
699 Views

Just to clarify, is it possible to define a custom Caffe layer (written in C), such as a custom pooling operation, and have this layer execute as part of a graph on one of the ARM cores on the NCS? If not, how is this achieved with the NCS architecture? Is the compute split up between host CPU and NCS?

0 Kudos
idata
Employee
699 Views

I assume that it's not possible to do anything more than a basic, static graph with the NCS? Why would I fork out $100 US when I can achieve all of this on my 8 core CPU and highend CUDA capable GPU, and test out machine vision algorithms that way? The whole point of the Myriad 2 vision processor is that it offers low power, mobile compute capability, and I can't even access the NCS from a mobile platform, nor get access to the ARM cores on the chip for developing custom layers.

 

Am I missing something?

0 Kudos
idata
Employee
699 Views

@SubZero The NCS and MvNC SDK is designed to enable rapid prototyping, validation and deployment of Deep Neural Network (DNN) inference applications at the edge. As a network architect, you would make use of mvNCProfile.pyc and mvNCCheck.pyc to profile your custom Caffe based networks. As an applications developer, you would make use of mvNCCompile.pyc and the comprehensive API framework to integrate your DNN accelerated image processing applications into your edge device prototypes. Here's a more detailed explanation of what you can do with MvNC SDK - https://forums.intel.com/s/question/0D50P00004NLzz7SAD. As you may have read in our product FAQ section and on other posts, we currently support Caffe framework only, but that may change in future to provide more options to our developers.

 

Side note: The MDK provides finer control over the Myriad's RISC processes, SHAVE cores and it's peripherals, but please note that access to this kit is selectively managed through www.movidius.com/contact

 

 

Is the compute split up between host CPU and NCS?

 

NCS acts as a coprocessor to your host CPU (x86_64 or ARM/RPI). The main responsibility of the host CPU is to use the MvNC API framework to load the binary graph file, load images for inferencing and get results from the NCS. You can learn more about the API framework on the API user guide which you can find in the download section.

 

 

 

iamintel

0 Kudos
idata
Employee
699 Views

Thanks for the reply Ashwin.

 

So based on what appears in the docs which I have read so far, mvNCCompile.pyc compiles a static version of an existing Caffe graph (neglecting custom C layers which I would normally integrate into a graph which executes on desktop multicore CPU and CUDA GPU). Based on the above forum reference, it states that the PYC compiles the weights and structures of the graph for execution on the Myriad 2 processor.

 

I would really like to exploit the ARM cores on the Myriad 2 in order to execute those custom layers completely on the Myriad 2, instead of hacking around and performing half compute on the Myriad 2, pulling back the output, performing the processing on the host CPU, reuploading for the remaining layers, etc.

 

Can this be achieved completely on the Myriad 2, with the existing SDK, or are there existing technical references which would allow development of custom code to achieve this?

0 Kudos
idata
Employee
699 Views

@SubZero MvNC SDK (SDK for NCS) currently doesn't support custom layers, but this may change in the future.

0 Kudos
idata
Employee
699 Views

If it supported Tensorflow and custom ops, I would buy one, but until then, it's kind of a waste of time.

0 Kudos
Reply