nvdla / sw

NVDLA SW
Other
476 stars 190 forks source link

test compiler, runtime with several cmodel configurations in vp #184

Open andyzheng-snps opened 4 years ago

andyzheng-snps commented 4 years ago

I tests several configurations using docker and vp environemnt. 1 prebuilt compiler + prebuilt runtime+ prebuilt qbox simulator+opendla_1.ko nv_full +fp16 can pass--------I think prebuilt compiler is based on open source version because command line parameter is like open source version. 2 prebuilt compiler + prebuilt runtime+ prebuilt qbox simulator+opendla_2.ko nv_small +int8 fail-----------I think prebuild qbox simulator is for nv_full cmodel.

3 prebuilt compiler + prebuilt runtime+ self built qbox simulator with nv small cmodel+opendla_2.ko nv_small +int8 fail

4 all thing re-built-including (compiler,runtime, qbox simulator with nv small, int8) nv_small +int8 fail

all of fails are same state in the terminal:

./nvdla_runtime --loadable basic.nvdla --image violin.jpg

creating new runtime context... Emulator starting dlaimg height: 224 x 224 x 3: LS: 896 SS: 0 Size: 200704 (DLA_TEST) Error 0x00000004: Mismatched channel: 3 != 4 (in TestUtils.cpp, function createImageCopy(), line 160) submitting tasks... [ 173.877766] Enter:dla_read_network_config [ 173.878467] Exit:dla_read_network_config status=0 [ 173.878697] Enter: dla_initiate_processors [ 173.880139] Enter: dla_submit_operation [ 173.880364] Prepare Convolution operation index 0 ROI 0 dep_count 1 [ 173.880586] Enter: dla_prepare_operation [ 173.881054] processor:Convolution group:0, rdma_group:0 available [ 173.881339] Enter: dla_read_config [ 173.881739] Exit: dla_read_config [ 173.881903] Exit: dla_prepare_operation status=0 [ 173.882082] Enter: dla_program_operation [ 173.882241] Program Convolution operation index 0 ROI 0 Group[0]

-----------compile nv small with int8---- creating new wisdom context... opening wisdom context... parsing caffe network... libnvdla<3> mark prob Marking total 1 outputs parsing calibration table... attaching parsed network to the wisdom... compiling profile "basic"... config "nv_small"... libnvdla<2> Prototxt #chnls (C = 3) != Profile #chnls for input (NVDLA_IMG_A8B8G8R8: C = 4). Preferring #chnls from Profile for compiling. (DLA) Error 0x0000000b: Scale value is 0 for -0.000071 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) (DLA) Error 0x0000000b: Scale value is 0 for 0.000217 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) libnvdla<2> Scale value 1 for -0.000266176 is too small (threshold: 2) (DLA) Error 0x0000000b: Scale value is 0 for -0.000212 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) (DLA) Error 0x0000000b: Scale value is 0 for 0.000189 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) (DLA) Error 0x0000000b: Scale value is 0 for -0.000097 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) (DLA) Error 0x0000000b: Scale value is 0 for 0.000095 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) (DLA) Error 0x0000000b: Scale value is 0 for -0.000117 (in ./include/priv/LowPrecision.h, function scaleAndShiftFromScalarImpl2(), line 281) closing wisdom context...

So who can run through nv_small configuration in the vp?

thanks

andy

prasshantg commented 4 years ago

@andyzheng-snps you can ignore these error messages, it will cause some accuracy drop but not a failure. actually these should be converted to warnings.

andyzheng-snps commented 4 years ago

thanks for your confirm about compilation error. However why do vp exit after Program Convolution operation index 0 ROI 0 Group[0]? the step to run vp for nv_small:

1 #define DLA_2_CONFIG in opendla.h 2 re-build buildboot2017.11, compiler, runtime, kmd, vp with nv_small 3 compiler command line: ./nvdla_compiler --prototxt ResNet-50-deploy.prototxt --caffemodel ResNet-50-model.caffemodel --configtarget nv_small --profile basic --cprecision int8 --calibtable resnet50.json

4 runtime command line: ./nvdla_runtime --loadable basic.nvdla --image violin.jpg

andyzheng-snps commented 4 years ago

I finally pass resnet50 with nv small int8 setting in the vp environement. one tricky point: I need mannually copy three header files(project.h, opendla.h, opendla.uh) to release/include so that vp make and install those include files to /usr/local/include, otherwise vp will use nvdla v1 header files.

the inferrence result is : violin --> 512: 'corkscrew, bottle screw'. that inferrence error might be caused by calibtable. I will further investigate it.

andyzheng-snps commented 4 years ago

it is not lucky that when I use cat as input, still get 512: 'corkscrew, bottle screw'. who has this similar issue?