Routine Descriptor¶
The routine descriptor specifies the method of using command line options.
Usage
usage: DEVICE[:DTYPE][:CH][/LEVEL][/AUX][@INDICES]
Content of each category
Name | Content |
---|---|
DEVICE | The name of the device family; cpu , opencl , cuda etc., can be used. |
DTYPE | The data type; float32 (default), float16 , qint8 etc., can be used. |
CH | The positioning of channels in the tensor; chf (channels-first), |
chl (channels-last:default) are available. |
|
LEVEL | Optimization level of routine algorithms; naive , fast (default), and faster are available. |
AUX | Additional information; parameters other than LEVEL can be specified. |
INDICES | Specifies the layers using indexes; specifying a single index (such as @1 ), or multiple indexes (as in @1,2 , @1..3 ) is possible. |
Examples
- specify
'DEVICE='cpu', DTYPE='float32', CH='chl', LEVEL='faster' and AUX='wg3x3_nxn'
cpu/faster/wg3x3_nxn
- specify
DEVICE='opencl', DTYPE='float16', CH='chl', LEVEL='fast' and AUX=''
opencl:float16
- Specify
DEVICE='cpu', DTYPE='float32', CH='chf', LEVEL='naive' and AUX=''
cpu:chf/naive
Example commands that use routine descriptors
run
on GPU using OpenCL
$ softneuro run --routine opencl/fast@2..23 --routine cpu@1,24 vgg16.dnn
tune
on CPU with 8-bit quantization
$ softneuro tune --routine cpu:qint8/fast vgg16.dnn vgg16_tuned.dnn