Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] get_flops.py throws error for Pointpillars #3028

Open
3 tasks done
cadip92 opened this issue Aug 27, 2024 · 0 comments
Open
3 tasks done

[Bug] get_flops.py throws error for Pointpillars #3028

cadip92 opened this issue Aug 27, 2024 · 0 comments

Comments

@cadip92
Copy link

cadip92 commented Aug 27, 2024

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

sys.platform: linux
Python: 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:47:35) [GCC 12.3.0]
CUDA available: False
MUSA available: False
numpy_random_seed: 2147483648
GCC: gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)
PyTorch: 2.0.1+cu117
PyTorch compiling details: PyTorch built with:

  • GCC 9.3
  • C++ Version: 201703
  • Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v2.7.3 (Git Hash 6dbeffbae1f23cbbeae17adb7b5b13f1f37c080e)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • LAPACK is enabled (usually provided by MKL)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.7, CUDNN_VERSION=8.5.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=ON, TORCH_VERSION=2.0.1, 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_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,

TorchVision: 0.15.2+cu117
OpenCV: 4.10.0
MMEngine: 0.10.4
MMDetection: 3.3.0
MMDetection3D: 1.4.0+962f093
spconv2.0: False

Reproduces the problem - code sample

python tools/analysis_tools/get_flops.py configs/pointpillars/pointpillars_hv_secfpn_sbn-all_8xb4-2x_nus-3d.py --modality point

Reproduces the problem - command or script

python tools/analysis_tools/get_flops.py configs/pointpillars/pointpillars_hv_secfpn_sbn-all_8xb4-2x_nus-3d.py --modality point

Reproduces the problem - error message

warnings.warn(
Traceback (most recent call last):
File "tools/analysis_tools/get_flops.py", line 83, in
main()
File "tools/analysis_tools/get_flops.py", line 73, in main
flops, params = get_model_complexity_info(model, input_shape)
File "/beegfs/chandorkar/miniforge3/envs/mmdet3d/lib/python3.8/site-packages/mmcv/cnn/utils/flops_counter.py", line 107, in get_model_complexity_info
_ = flops_model(batch)
File "/beegfs/chandorkar/miniforge3/envs/mmdet3d/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1538, in _call_impl
result = forward_call(*args, **kwargs)
File "/beegfs/chandorkar/projects/mmdetection3d/mmdet3d/models/detectors/base.py", line 88, in forward
return self._forward(inputs, data_samples, **kwargs)
TypeError: _forward() takes 1 positional argument but 3 were given

Additional information

Seems like a bug in the code. I get the same error with the config file for kitti.
configs/pointpillars/pointpillars_hv_secfpn_8xb6-160e_kitti-3d-3class.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant