forked from open-mmlab/mmdeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support onnxruntime fp16 (open-mmlab#2269)
* support ort-fp16 * update configs * update * update reg ci * fix mmrotate mmdet3d ort fp16 * fix dead links
- Loading branch information
1 parent
553f9b8
commit 64e96e3
Showing
29 changed files
with
191 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
backend_config = dict( | ||
type='onnxruntime', | ||
precision='fp16', | ||
common_config=dict( | ||
min_positive_val=1e-7, | ||
max_finite_val=1e4, | ||
keep_io_types=False, | ||
disable_shape_infer=False, | ||
op_block_list=None, | ||
node_block_list=None)) |
6 changes: 6 additions & 0 deletions
6
configs/mmaction/video-recognition/video-recognition_onnxruntime-fp16_static.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
_base_ = [ | ||
'./video-recognition_static.py', | ||
'../../_base_/backends/onnxruntime-fp16.py' | ||
] | ||
|
||
onnx_config = dict(input_shape=None) |
4 changes: 4 additions & 0 deletions
4
configs/mmagic/super-resolution/super-resolution_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_base_ = [ | ||
'./super-resolution_dynamic.py', | ||
'../../_base_/backends/onnxruntime-fp16.py' | ||
] |
3 changes: 3 additions & 0 deletions
3
configs/mmdet/detection/detection_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'../_base_/base_dynamic.py', '../../_base_/backends/onnxruntime-fp16.py' | ||
] |
4 changes: 4 additions & 0 deletions
4
configs/mmdet/instance-seg/instance-seg_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_base_ = [ | ||
'../_base_/base_instance-seg_dynamic.py', | ||
'../../_base_/backends/onnxruntime-fp16.py' | ||
] |
3 changes: 3 additions & 0 deletions
3
configs/mmdet3d/voxel-detection/voxel-detection_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'./voxel-detection_dynamic.py', '../../_base_/backends/onnxruntime-fp16.py' | ||
] |
3 changes: 3 additions & 0 deletions
3
configs/mmocr/text-detection/text-detection_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'./text-detection_dynamic.py', '../../_base_/backends/onnxruntime-fp16.py' | ||
] |
4 changes: 4 additions & 0 deletions
4
configs/mmocr/text-recognition/text-recognition_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_base_ = [ | ||
'./text-recognition_dynamic.py', | ||
'../../_base_/backends/onnxruntime-fp16.py' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'./pose-detection_static.py', '../_base_/backends/onnxruntime-fp16.py' | ||
] |
18 changes: 18 additions & 0 deletions
18
configs/mmpose/pose-detection_simcc_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_base_ = [ | ||
'./pose-detection_static.py', '../_base_/backends/onnxruntime-fp16.py' | ||
] | ||
|
||
onnx_config = dict( | ||
input_shape=[192, 256], | ||
output_names=['simcc_x', 'simcc_y'], | ||
dynamic_axes={ | ||
'input': { | ||
0: 'batch', | ||
}, | ||
'simcc_x': { | ||
0: 'batch' | ||
}, | ||
'simcc_y': { | ||
0: 'batch' | ||
} | ||
}) |
3 changes: 3 additions & 0 deletions
3
configs/mmpretrain/classification_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'./classification_dynamic.py', '../_base_/backends/onnxruntime-fp16.py' | ||
] |
25 changes: 25 additions & 0 deletions
25
configs/mmrotate/rotated-detection_onnxruntime-fp16_dynamic.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
_base_ = [ | ||
'./rotated-detection_static.py', '../_base_/backends/onnxruntime-fp16.py' | ||
] | ||
|
||
onnx_config = dict( | ||
output_names=['dets', 'labels'], | ||
input_shape=[1024, 1024], | ||
dynamic_axes={ | ||
'input': { | ||
0: 'batch', | ||
2: 'height', | ||
3: 'width' | ||
}, | ||
'dets': { | ||
0: 'batch', | ||
1: 'num_dets', | ||
}, | ||
'labels': { | ||
0: 'batch', | ||
1: 'num_dets', | ||
}, | ||
}) | ||
|
||
backend_config = dict( | ||
common_config=dict(op_block_list=['NMSRotated', 'Resize'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_base_ = [ | ||
'./segmentation_dynamic.py', '../_base_/backends/onnxruntime-fp16.py' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.