Compiling the Operator Plug-In
- Log in to the DDK server as the DDK installation user.
- Modify the Makefile file in projects/customop_te/plugin.
cd $HOME/tools/projects/customop_te/plugin/
vi Makefile
- Change the name of the generated operator plug-in.
ll : libcaffe_reduction_layer.so lib_caffe_parser.so ......bian libcaffe_reduction_layer.so: $(OBJS_customop) $(CC) -c $(CC_FLAGS) -o proto/caffe/caffe.pb.o proto/caffe/caffe.pb.cc $(CC) $^ $(LNK_FLAGS) -o $@ lib_caffe_parser.so: $(OBJS_no_customop) $(CC) -c $(CC_FLAGS) -o proto/caffe/caffe.pb.o proto/caffe/caffe.pb.cc @if [ -f $(LOCAL_DIR)/proto/caffe/caffe.proto ]; then $(CC) $^ proto/caffe/caffe.pb.o $(LNK_FLAGS) -o $@; fi;
libcaffe_reduction_layer.so is the name of the generated operator plug-in. You can change the name as required.
lib_caffe_parser.so is the library file generated during the parsing of the caffe.proto file, and its name cannot be changed. For Caffe operators, ensure that all unsupported custom ones in the same model have been defined in caffe.proto File Operator Definition (Optional).
- Set TOPDIR to the installation directory of the DDK.
ifeq ($(DDK_PATH),) TOPDIR := $(HOME)/tools/che/ddk/ddk else TOPDIR := $(DDK_PATH) endif
- Use the default values for other parameters in Makefile, which serve as the common template for the operator plug-in compilation.
- Change the name of the generated operator plug-in.
- Compile the operator plug-in.
Run the following command in the plug-in directory to compile the operator plug-in:
make
After the compilation is complete, the operator plug-in file libcaffe_reduction_layer.so is generated in the current directory.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot