From 3d9908ca59cc5c81df850dfb843165957d684266 Mon Sep 17 00:00:00 2001 From: fairwarning Date: Thu, 26 Aug 2021 07:20:01 +0000 Subject: [PATCH] for test --- tests/L0/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/L0/device.py b/tests/L0/device.py index 5f103cc..1b8e05a 100644 --- a/tests/L0/device.py +++ b/tests/L0/device.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + import torch if torch.cuda.is_available(): CALCULATE_DEVICE = 'cuda' @@ -19,4 +20,4 @@ else: CALCULATE_DEVICE = 'npu' def is_npu(): - return CALCULATE_DEVICE.find('npu') != -1 \ No newline at end of file + return CALCULATE_DEVICE.find('npu') != -1 -- Gitee