-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Context
CI is taking a while (see #8552 and build#1384), and I am tracking short-term fixes to alleviate this
Summary of the issue
test_roi_align is pretty well tested at the relay and topi level as well as the frontends. However, the ONNX roi align tests take 7 minutes vs just 7 seconds on pytorch.
Part of this is because there are more tests on onnx with larger shapes.
# onnx (7min runtime)
verify_roi_align((1, 4, 16, 16), 32, 7, 7, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((4, 4, 16, 32), 32, 7, 7, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((1, 8, 16, 16), 32, 7, 7, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((1, 4, 8, 8), 32, 7, 7, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((1, 4, 16, 16), 16, 5, 7, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((1, 4, 16, 12), 8, 7, 3, sampling_ratio=0, spatial_scale=1.0)
verify_roi_align((1, 4, 16, 16), 32, 7, 7, sampling_ratio=0, spatial_scale=0.5)
verify_roi_align((3, 4, 12, 16), 32, 7, 7, sampling_ratio=0, spatial_scale=1.5)
verify_roi_align((5, 4, 16, 14), 32, 7, 7, sampling_ratio=1, spatial_scale=1.0)
verify_roi_align((1, 4, 16, 16), 32, 7, 7, sampling_ratio=2, spatial_scale=1.0)
# pytorch (7sec runtime)
verify_model(ROIAlign(7), [in_data, in_boxes])
verify_model(ROIAlign((10, 10), 0.7, 5), [in_data, in_boxes])
verify_model(ROIAlign(15, 0.9, 3), [in_data, in_boxes])
Perhaps secondarily, the ONNX frontend is just slower at lowering ROI align.
Suggested actions
- Reduce the number of ROI align tests on the ONNX frontend. It's already pretty well covered at each level of the stack
- Minimize the input/output shapes of each ROI align test case