From 94acddb57f3408e1944a64db75447028ad15732b Mon Sep 17 00:00:00 2001 From: Lu Fang Date: Fri, 11 Jan 2019 15:57:12 -0800 Subject: [PATCH] Fix the lint (#15973) Summary: Fix the lint error introduced in https://github.com/pytorch/pytorch/pull/15965 Pull Request resolved: https://github.com/pytorch/pytorch/pull/15973 Differential Revision: D13640856 Pulled By: houseroad fbshipit-source-id: 3f14d9898dcfb0fc469468f63fa1461c88b66b2e --- torch/onnx/symbolic.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/torch/onnx/symbolic.py b/torch/onnx/symbolic.py index 8655d33..30091ec 100644 --- a/torch/onnx/symbolic.py +++ b/torch/onnx/symbolic.py @@ -1082,20 +1082,22 @@ scalar_name_to_pytorch = { 'int16_t': 'Short', } + # This indicates each scalar type's corresponding # torch type. Related source: # https://github.com/pytorch/pytorch/blob/da7468853ae322252270bbb58032668bd21b7457/c10/core/ScalarType.h scalar_type_to_pytorch_type = [ - torch.uint8, # 0 - torch.int8, # 1 - torch.short, # 2 - torch.int, # 3 - torch.int64, # 4 - torch.half, # 5 - torch.float, # 6 - torch.double, # 7 + torch.uint8, # 0 + torch.int8, # 1 + torch.short, # 2 + torch.int, # 3 + torch.int64, # 4 + torch.half, # 5 + torch.float, # 6 + torch.double, # 7 ] + def _cast_func_template(to_i, g, input, non_blocking): return g.op("Cast", input, to_i=to_i) -- 2.7.4