From ea893d3d2e764428bbb5f70ee7aa7cadfc4cbbcf Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 18 Sep 2019 11:29:30 -0300 Subject: [PATCH] Fix lint --- torchvision/csrc/ROIPool.h | 1 - torchvision/csrc/vision.cpp | 1 - torchvision/extension.py | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/torchvision/csrc/ROIPool.h b/torchvision/csrc/ROIPool.h index a630f51c0f3..79b40293176 100644 --- a/torchvision/csrc/ROIPool.h +++ b/torchvision/csrc/ROIPool.h @@ -65,7 +65,6 @@ at::Tensor ROIPool_backward( width); } - using namespace at; using torch::Tensor; using torch::autograd::AutogradContext; diff --git a/torchvision/csrc/vision.cpp b/torchvision/csrc/vision.cpp index 5c24cb20f27..243e2e87ff9 100644 --- a/torchvision/csrc/vision.cpp +++ b/torchvision/csrc/vision.cpp @@ -27,7 +27,6 @@ PyMODINIT_FUNC PyInit__custom_ops(void) { #endif #endif - int64_t _cuda_version() { #ifdef WITH_CUDA return CUDA_VERSION; diff --git a/torchvision/extension.py b/torchvision/extension.py index ecf95f075cf..790bca0d1f4 100644 --- a/torchvision/extension.py +++ b/torchvision/extension.py @@ -1,5 +1,6 @@ _HAS_OPS = False + def _register_extensions(): import os import imp @@ -10,6 +11,7 @@ def _register_extensions(): _, path, _ = imp.find_module("_C", [lib_dir]) torch.ops.load_library(path) + try: _register_extensions() _HAS_OPS = True @@ -44,4 +46,5 @@ def _check_cuda_version(): .format(t_major, t_minor, tv_major, tv_minor)) return _version + _check_cuda_version()