fix lint errors in gen.py (#19221)
authorJerry Zhang <jerryzh@fb.com>
Sat, 13 Apr 2019 01:10:37 +0000 (18:10 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 13 Apr 2019 01:26:38 +0000 (18:26 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19221

att

Reviewed By: colesbury

Differential Revision: D14923858

fbshipit-source-id: 4793d7794172d401455c5ce72dfc27dddad515d4

aten/src/ATen/gen.py

index 08da16b..b89dd02 100644 (file)
@@ -174,13 +174,15 @@ generators = {
     },
 }
 
-backends = ['CPU', 'CUDA', 'QuantizedCPU']
-densities = ['Dense', 'Sparse', 'Mkldnn']  # TODO: layout instead of densities?
+
 def backend_to_devicetype(backend):
     if backend == 'QuantizedCPU':
         return 'CPU'
     return backend
 
+backends = ['CPU', 'CUDA', 'QuantizedCPU']
+densities = ['Dense', 'Sparse', 'Mkldnn']  # TODO: layout instead of densities?
+
 quantized_backends = ['QuantizedCPU']
 
 extension_backends = ['MSNPU', 'XLA']
@@ -203,7 +205,6 @@ scalar_types = [
 ] + quantized_scalar_types
 
 
-
 # shared environment for non-derived base classes Type.h Tensor.h Storage.h
 top_env = {
     'cpu_type_registrations': [],
@@ -439,7 +440,7 @@ def iterate_types():
                     continue
                 if backend in quantized_backends:
                     if density == 'Dense' and scalar_type in quantized_scalar_types:
-                            yield (backend, density, scalar_type)
+                        yield (backend, density, scalar_type)
                     else:
                         continue
                 else: