From 01dcd54b1920453bb8e3aff4ccd7017c1ad697bd Mon Sep 17 00:00:00 2001 From: nihui Date: Fri, 21 Jul 2023 07:38:59 +0800 Subject: [PATCH] Add ncnn auto thread count (#3847) Co-authored-by: Glenn Jocher --- ultralytics/nn/autobackend.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ultralytics/nn/autobackend.py b/ultralytics/nn/autobackend.py index 242f356..d409268 100644 --- a/ultralytics/nn/autobackend.py +++ b/ultralytics/nn/autobackend.py @@ -3,7 +3,6 @@ import ast import contextlib import json -import os import platform import zipfile from collections import OrderedDict, namedtuple @@ -267,7 +266,6 @@ class AutoBackend(nn.Module): check_requirements('git+https://github.com/Tencent/ncnn.git' if ARM64 else 'ncnn') # requires ncnn import ncnn as pyncnn net = pyncnn.Net() - net.opt.num_threads = os.cpu_count() net.opt.use_vulkan_compute = cuda w = Path(w) if not w.is_file(): # if not *.param