Forums - Pointwise Convolution causes Fatal signal 11 on GPU and DSP

3 posts / 0 new
Last post
Pointwise Convolution causes Fatal signal 11 on GPU and DSP
anhpham
Join Date: 13 Nov 22
Posts: 3
Posted: Sat, 2023-02-11 04:42
Hi,
 
I have found that Pointwise convolution leads to "Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR)" when used without CPU. I believe that SNPE's implementation has a bug in the parallel implementation. To confirm, I used a simple DLC model with only Convolution(in_channels=1, out_channels=1, kernel_size=1) layer and input shape [1, 13, 13, 1]. SNPE ran fine on CPU, but crash if I run this model  in GPU or DSP.
 
To add more details, I tried to use Picodet with SNPE. When exported to ONNX without an NMS layer, the model has two output layers for bounding boxes and scores. After a few modifications (replace HardSigmoid layer), the model could be converted to DLC format without errors. It run without error on CPU, GPU and DSP when use default setting i.e. bounding boxes is the only output. But the program starts to hit Fatal 11 if the outputs include scores branch and run in GPU/DSP.
 
I'm using SNPE 1.68 on an QCS605 running Android 10.
 
  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sun, 2023-02-12 05:21

Dear developer,

Could you please help to share your conversion and quantization commands to us for deeply checking?

BR.

Wei

  • Up0
  • Down0
anhpham
Join Date: 13 Nov 22
Posts: 3
Posted: Sun, 2023-02-12 19:11

My conversion command:

  1. Freeze the PaddleDet model: python tools/export_model.py -c configs/picodet/picodet_m_416_coco_lcnet.yml --output_dir exported_no_nms -o weights=85.pdparams export.nms=False # (85.pdparams is my trained weights, please replace it with the pretrain)
  2. Convert to ONNX without NMS layer: paddle2onnx --model_filename model.pdmodel --params_filename model.pdiparams --model_dir exported_no_nms/picodet_m_416_coco_lcnet --opset_version 12
     --save_file picodet_m_lcnet_no_nms.onnx
  3. ONNX to DLC: snpe-onnx-to-dlc --input_network picodet_m_lcnet_no_nms.onnx --batch 1 --strict

For running with SNPE, I have to replace HardSigmoid layer in ONNX model with .Add.Clip.Div. This model has a PointWise convolution in scores brach.

When inference, I directly use the exported model above and depend on SNPE for automatically quantizing.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.