mmyolo icon indicating copy to clipboard operation
mmyolo copied to clipboard

About FPS

Open wsy-yjys opened this issue 11 months ago • 0 comments

Prerequisite

🐞 Describe the bug

python -m torch.distributed.launch --nproc_per_node=1 --master_port=29500 tools/analysis_tools/benchmark.py configs/yolov6/yolov6_v3_n_syncbn_fast_2xb32-300e_coco_SGD.py  work_dirs/yolov6_v3_n_syncbn_fast_2xb32-300e_coco_SGD/best_coco_bbox_mAP_epoch_300.pth --launcher pytorch

您好,我使用上述命令测试模型的fps时遇到如下报错:

(openmmlab) E:\code\mmyolo-main1127>python -m torch.distributed.launch --nproc_per_node=1 --master
_port=29500 tools/analysis_tools/benchmark.py        configs/yolov6/yolov6_v3_n_syncbn_fast_2xb32-300e_coco_SGD.py  work_dirs/y
olov6_v3_n_syncbn_fast_2xb32-300e_coco_SGD/best_coco_bbox_mAP_epoch_300.pth --launcher pytorch
NOTE: Redirects are currently not supported in Windows or MacOs.
D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launch.py:181: FutureWarning: The module torch.distributed.launc
h is deprecated
and will be removed in future. Use torchrun.
Note that --use-env is set by default in torchrun.
If your script expects `--local-rank` argument to be set, please
change it to read from `os.environ['LOCAL_RANK']` instead. See
https://pytorch.org/docs/stable/distributed.html#launch-utility  for
further instructions

  warnings.warn(
[W C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\socket.cpp:601] [c10d] The clien
t socket has failed to connect to [license.piriform.com]:29500 (system error: 10049 - 在其上下文中,该请求的地址无效。).       
[W C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\distributed\c10d\socket.cpp:601] [c10d] The clien
t socket has failed to connect to [license.piriform.com]:29500 (system error: 10049 - 在其上下文中,该请求的地址无效。).       
usage: benchmark.py [-h] [--repeat-num REPEAT_NUM] [--max-iter MAX_ITER] [--log-interval LOG_INTERVAL] [--work-dir WORK_DIR]
                    [--fuse-conv-bn] [--cfg-options CFG_OPTIONS [CFG_OPTIONS ...]] [--launcher {none,pytorch,slurm,mpi}]       
                    [--local_rank LOCAL_RANK]
                    config checkpoint
benchmark.py: error: unrecognized arguments: --local-rank=0
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 2) local_rank: 0 (pid: 50000) of binary: D:\Anaconda\envs
\openmmlab\python.exe
Traceback (most recent call last):
  File "D:\Anaconda\envs\openmmlab\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\Anaconda\envs\openmmlab\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launch.py", line 196, in <module>
    main()
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launch.py", line 192, in main
    launch(args)
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launch.py", line 177, in launch
    run(args)
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\run.py", line 785, in run
    elastic_launch(
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launcher\api.py", line 134, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "D:\Anaconda\envs\openmmlab\lib\site-packages\torch\distributed\launcher\api.py", line 250, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
tools/analysis_tools/benchmark.py FAILED
------------------------------------------------------------
Failures:
  <NO_OTHER_FAILURES>
------------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2024-03-18_12:01:26
  host      : LAPTOP-Q5TMK07Q
  rank      : 0 (local_rank: 0)
  exitcode  : 2 (pid: 50000)
  error_file: <N/A>
  traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html
============================================================

Environment

(openmmlab) E:\code\mmyolo-main1127>python mmyolo/utils/collect_env.py
sys.platform: win32
Python: 3.8.16 (default, Mar  2 2023, 03:18:16) [MSC v.1916 64 bit (AMD64)]
CUDA available: True                                                       
numpy_random_seed: 2147483648                                              
GPU 0: NVIDIA GeForce RTX 2060                                             
CUDA_HOME: D:\software\cuda_10.2.89_441.22_win10                           
NVCC: Cuda compilation tools, release 10.2, V10.2.8
MSVC: Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
GCC: n/a
PyTorch: 2.0.0+cu118
PyTorch compiling details: PyTorch built with:
  - C++ Version: 199711
  - MSVC 193431937
  - Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)
  - OpenMP 2019
  - LAPACK is enabled (usually provided by MKL)
  - CPU capability usage: AVX2
  - CUDA Runtime 11.8
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,c
ode=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;
arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90;-gencode;arch=compute_37,cod
e=compute_37
  - CuDNN 8.7
  - Magma 2.5.4
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.8, CUDNN_VERSION=8.7.0, CXX_COMPILER=C:/actions-runner/_
work/pytorch/pytorch/builder/windows/tmp_bin/sccache-cl.exe, CXX_FLAGS=/DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj /FS -DUSE_PTHREA
DPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_H
ANDLE, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=OFF, TORCH_VERSION=2.0
.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_N
CCL=OFF, USE_NNPACK=OFF, USE_OPENMP=ON, USE_ROCM=OFF,

TorchVision: 0.15.1+cu118
OpenCV: 4.7.0
MMEngine: 0.7.2
MMCV: 2.0.1
MMDetection: 3.0.0
MMYOLO: 0.6.0+

Additional information

No response

wsy-yjys avatar Mar 18 '24 04:03 wsy-yjys