I use measure_latency.py to measure latency. I always get the error "AttributeError: 'Namespace' object has no attribute 'options'". So I chose to use benchmark.py in the analysis tool to measure the latency of the model. Then I found that there was no difference in latency between the 42ms pre-trained model and the 33ms pre-trained model. And when I set the pruning ratio to 0, there is no significant change in latency.
Environment
Python: 3.7.16 (default, Jan 17 2023, 22:20:44) [GCC 11.2.0]
CUDA available: True
GPU 0: NVIDIA GeForce RTX 3080
CUDA_HOME: /usr/local/cuda-11.3
NVCC: Cuda compilation tools, release 11.3, V11.3.58
GCC: gcc (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0
PyTorch: 1.12.1+cu113
PyTorch compiling details: PyTorch built with:
GCC 9.3
C++ Version: 201402
Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
This issue has been resolved. I found that I did not apply the pruning ratio correctly.
I am curious how you measure MACs, is it measured at runtime or statically?
Prerequisite
💬 Describe the reimplementation questions
I use measure_latency.py to measure latency. I always get the error "AttributeError: 'Namespace' object has no attribute 'options'". So I chose to use benchmark.py in the analysis tool to measure the latency of the model. Then I found that there was no difference in latency between the 42ms pre-trained model and the 33ms pre-trained model. And when I set the pruning ratio to 0, there is no significant change in latency.
Environment
Python: 3.7.16 (default, Jan 17 2023, 22:20:44) [GCC 11.2.0] CUDA available: True GPU 0: NVIDIA GeForce RTX 3080 CUDA_HOME: /usr/local/cuda-11.3 NVCC: Cuda compilation tools, release 11.3, V11.3.58 GCC: gcc (Ubuntu 9.5.0-1ubuntu1~22.04) 9.5.0 PyTorch: 1.12.1+cu113 PyTorch compiling details: PyTorch built with:
TorchVision: 0.13.1+cu113 OpenCV: 4.10.0 MMCV: 1.7.2 MMCV Compiler: GCC 9.5 MMCV CUDA Compiler: 11.3 MMDetection: 2.28.2+f24230e
Expected results
No response
Additional information
No response