-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Let's summarize steps needed to update our PyTorch support for the latest version, 1.6 (the CI is at 1.4).
-
Quantization support: It is completely broken due to a bug introduced in 1.6 (see state_dict for quantized models pytorch/pytorch#42497). I found a simple workaround for that problem (finally!) and the fix is WIP. The representation of quantized weights and APIs of quantized ops have changed. To support both 1.6 and older versions, we need to handle both cases (with version check) for now.
-
torchvision detection model support: Need to add converters for
aten::tensor,aten::empty,aten::numelandaten::IntImplicit. All of these ops seem trivial. I found that other missing ops I mentioned in [Frontend][Pytorch] Improve Pytorch frontend for object detection models #6449 (comment) can be removed usingtorch._C._jit_pass_onnx_function_substitution(...)pass. We also need to deal with one functionbatched_nmsthat was used to be traced but now it is scripted, see https://github.com/pytorch/vision/blob/6e10e3f88158f12b7a304d3c2f803d2bbdde0823/torchvision/ops/boxes.py#L42-L43
We need to solve a typing problem involvingIfand Any type. -
Disable or fix tests that no longer work. For example, tracing googlenet is broken on Torch 1.5 or higher (see googlenet fires assert for not being an nn.Module with torch.jit.trace() pytorch/vision#2161), so we need to disable googlenet tests.
-
Upgrade CI docker image
cc @t-vi @siju-samuel @kevinthesun @yongwww @alexwong @tqchen