From e09d277fd3f53eaa6b3f2288e787ffc8b1f922b3 Mon Sep 17 00:00:00 2001 From: "tingwei.gtw" Date: Sat, 22 Oct 2022 19:19:23 +0800 Subject: [PATCH] [to #42322933] fix cpu inference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复cpu推理 Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10468823 --- .../models/cv/face_human_hand_detection/one_stage_detector.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/modelscope/models/cv/face_human_hand_detection/one_stage_detector.py b/modelscope/models/cv/face_human_hand_detection/one_stage_detector.py index c1d0a52f..0d1cd15d 100644 --- a/modelscope/models/cv/face_human_hand_detection/one_stage_detector.py +++ b/modelscope/models/cv/face_human_hand_detection/one_stage_detector.py @@ -56,9 +56,6 @@ class OneStageDetector(nn.Module): def inference(self, meta): with torch.no_grad(): - torch.cuda.synchronize() preds = self(meta['img']) - torch.cuda.synchronize() results = self.head.post_process(preds, meta) - torch.cuda.synchronize() return results