Zaida Zhou
03b38a46ad
[Refactor] Move is_mlu_available to mmcv/utils/device_type.py ( #1884 )
...
* [Refactor] Move is_mlu_available to mmcv/utils/device_type.py
* remove comma
* fix isort
2022-04-17 00:15:35 +08:00
Jiazhen Wang
362a90f8bf
[Feature] Add several MLU ops ( #1563 )
...
* [Feature] Add roiaware pool3d ops from mmdet3d (#1382 )
* add ops (roiaware pool3d) in mmdet3d
* refactor code
* fix typo
Co-authored-by: zhouzaida <zhouzaida@163.com>
* [Feature] Add iou3d op from mmdet3d (#1356 )
* add ops (iou3d) in mmdet3d
* add unit test
* refactor code
* refactor code
* refactor code
* refactor code
* refactor code
Co-authored-by: zhouzaida <zhouzaida@163.com>
* [Fix] Update test data for test_iou3d (#1427 )
* Update test data for test_iou3d
* delete blank lines
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Feature] Add group points ops from mmdet3d (#1415 )
* add op (group points) and its related ops (ball query and knn) in mmdet3d
* refactor code
* fix typo
* refactor code
* fix typo
* refactor code
* make input contiguous
Co-authored-by: zhouzaida <zhouzaida@163.com>
* add mmdet3d op (#1425 )
Co-authored-by: zhouzaida <zhouzaida@163.com>
* [Feature] Loading objects from different backends and dumping objects to different backends (#1330 )
* [Feature] Choose storage backend by the prefix of filepath
* refactor FileClient and add unittest
* support loading from different backends
* polish docstring
* fix unittet
* rename attribute str_like_obj to is_str_like_obj
* add infer_client method
* add check_exist method
* rename var client to file_client
* polish docstring
* add join_paths method
* remove join_paths and add _format_path
* enhance unittest
* refactor unittest
* singleton pattern
* fix test_clientio.py
* deprecate CephBackend
* enhance docstring
* refactor unittest for petrel
* refactor unittest for disk backend
* update io.md
* add concat_paths method
* improve docstring
* improve docstring
* add isdir and copyfile for file backend
* delete copyfile and add get_local_path
* remove isdir method of petrel
* fix typo
* add comment and polish docstring
* polish docstring
* rename _path_mapping to _map_path
* polish docstring and fix typo
* refactor get_local_path
* add list_dir_or_file for FileClient
* add list_dir_or_file for PetrelBackend
* fix windows ci
* Add return docstring
* polish docstring
* fix typo
* fix typo
* deprecate the conversion from Path to str
* add docs for loading checkpoints with FileClient
* refactor map_path
* add _ensure_methods to ensure methods have been implemented
* fix list_dir_or_file
* rename _ensure_method_implemented to has_method
* Add CI for pytorch 1.10 (#1431 )
* [Feature] Upload checkpoints and logs to ceph (#1375 )
* [Feature] Choose storage backend by the prefix of filepath
* refactor FileClient and add unittest
* support loading from different backends
* polish docstring
* fix unittet
* rename attribute str_like_obj to is_str_like_obj
* [Docs] Upload checkpoint to petrel oss
* add infer_client method
* Support uploading checkpoint to petrel oss
* add check_exist method
* refactor CheckpointHook
* support uploading logs to ceph
* rename var client to file_client
* polish docstring
* enhance load_from_ceph
* refactor load_from_ceph
* refactor TextLoggerHook
* change the meaning of out_dir argument
* fix test_checkpoint_hook.py
* add join_paths method
* remove join_paths and add _format_path
* enhance unittest
* refactor unittest
* add a unittest for EvalHook when file backend is petrel
* singleton pattern
* fix test_clientio.py
* deprecate CephBackend
* add warning in load_from_ceph
* fix type of out_suffix
* enhance docstring
* refactor unittest for petrel
* refactor unittest for disk backend
* update io.md
* add concat_paths method
* fix CI
* mock check_exist
* improve docstring
* improve docstring
* improve docstring
* improve docstring
* add isdir and copyfile for file backend
* delete copyfile and add get_local_path
* remove isdir method of petrel
* fix typo
* rename check_exists to exists
* refactor code and polish docstring
* fix windows ci
* add comment and polish docstring
* polish docstring
* polish docstring
* rename _path_mapping to _map_path
* polish docstring and fix typo
* refactor get_local_path
* add list_dir_or_file for FileClient
* add list_dir_or_file for PetrelBackend
* fix windows ci
* Add return docstring
* polish docstring
* fix typo
* fix typo
* fix typo
* fix error when mocking PetrelBackend
* deprecate the conversion from Path to str
* add docs for loading checkpoints with FileClient
* rename keep_log to keep_local
* refactor map_path
* add _ensure_methods to ensure methods have been implemented
* fix list_dir_or_file
* rename _ensure_method_implemented to has_method
* refactor
* polish information
* format information
* bump version to v1.3.16 (#1430 )
* [Fix]: Update test data of test_tin_shift (#1426 )
* Update test data of test_tin_shift
* Delete tmp.engine
* add pytest raises asserterror test
* raise valueerror, update test log
* add more comment
* Apply suggestions from code review
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix the wrong function reference bug in BaseTransformerLayer when batch_first is True (#1418 )
* [Docs] Add mmcv itself in the docs list (#1441 )
* Add mmcv itself in the docs list
* modify link of docs
* [Improve] improve checkpoint loading log (#1446 )
* [Feature] Support SigmoidFocalLoss with Cambricon MLU backend (#1346 )
* [Feature] Support SigmoidFocalLoss with Cambricon MLU backend
* refactor MMCV_WITH_MLU macro define
* refactor NFU_ALIGN_SIZE, PAD_DOWN and split_pipeline_num
* delete extra fool proofing in cpp
* [Feature] Support SigmoidFocalLossBackward with Cambricon MLU backend
* fix macro definition in SigmoidFocalLoss
* refactor mlu files into clang-format
* refactor sigmoid focal loss test
* refactor Sigmoid Focal Loss file structure.
* fix python lint error
* fix import torch_mlu error type
* fix lint
* refactor clang format style to google
Co-authored-by: zhouzaida <zhouzaida@163.com>
* [Feature] Support RoiAlign With Cambricon MLU Backend (#1429 )
* [Feature] Support NMS with cambricon MLU backend (#1467 )
* [Feature] Support BBoxOverlaps with cambricon MLU backend (#1507 )
* [Refactor] Format C++ code
* [Refactor] include common_mlu_helper in pytorch_mlu_helper and refactor build condition
* [Improve] Improve the performance of roialign, nms and focalloss with MLU backend (#1572 )
* [Improve] Improve the performance of roialign with MLU backend
* replace CHECK_MLU with CHECK_MLU_INPUT
* [Improve] Improve the perf of nms and focallosssigmoid with MLU backend
* [Improve] Improve the performance of roialign with MLU backend (#1741 )
* [Feature] Support tin_shift with cambricon MLU backend (#1696 )
* [Feature] Support tin_shift with cambricon MLU backend
* [fix] Add the assertion of batch_size in tin_shift.py
* [fix] fix the param check of tin_shift in cambricon code
* [fix] Fix lint failure.
* [fix] Fix source file lint failure.
* Update mmcv/ops/tin_shift.py
[Refactor] Modify the code in mmcv/ops/tin_shift.py.
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: budefei <budefei@cambricon.com>
Co-authored-by: budefei <budefei@cambricom.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* resolve conflicts and fix lint
* fix mmcv.utils.__init__
* fix mmcv.utils.__init__
* Fix lints and change FLAG
* fix setup and refine
* remove a redundant line
* remove an unnecessary 'f'
* fix compilation error
Co-authored-by: dingchang <hudingchang.vendor@sensetime.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
Co-authored-by: q.yao <yaoqian@sensetime.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: pc <luopeichao@sensetime.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
Co-authored-by: q.yao <streetyao@live.com>
Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
Co-authored-by: Yuxin Liu <liuyuxin@cambricon.com>
Co-authored-by: zihanchang11 <92860914+zihanchang11@users.noreply.github.com>
Co-authored-by: shlrao <shenglong.rao@gmail.com>
Co-authored-by: zhouchenyang <zcy19950525@gmail.com>
Co-authored-by: Mrxiaofei <36697723+Mrxiaofei@users.noreply.github.com>
Co-authored-by: budefei <budefei@cambricon.com>
Co-authored-by: budefei <budefei@cambricom.com>
2022-04-16 15:45:00 +08:00
Qiza-lyhm
95273020b1
[Fix] Fix the output of scatter on MLU device ( #1881 )
...
To have the same shape of MLU copy and Scatter.forward, a 1-dim list has to be added.
Origin MMDP / MMDDP with this scatter_gather returns a list of tensor for each targets, and here MLU copy returns the same shape Tensor in a list of just one default target.
2022-04-15 19:43:05 +08:00
Danila Rukhovich
aee596d523
[Enhance] Differentiable rotated IoU ( #1854 )
...
* diff_iou_rotated is working
* add test; fix lint
* fix lint for test
* disable cpu build
* refactor files structure
* fix comments
* remove extra .repeat()
* add comment
* fix j-1 bug; update doc
* fix clang lint
* update docstrings
* fix comments
* fix comments
2022-04-15 15:40:07 +08:00
Charlyo
7982dd1a06
Make sure padding size is not negative ( #1792 )
...
* Make sure padding size is not negative
If Resize maintains aspect ratio, could be the case that image shape is bigger than resize value.
* Test pad shape smaller than image shape
* Fix lint
* Remove whitespaces
2022-04-15 14:05:32 +08:00
q.yao
74031cc508
NMS with CUDA only ( #1824 )
...
* add gather_keep_from_mask_parallize
* remove unused cache
* move syncthread
* remove unused comment
* add more comments, rename the kernel and variable
2022-04-15 14:01:56 +08:00
Wenwei Zhang
3270caf6af
Fix lint issue ( #1880 )
2022-04-15 13:51:02 +08:00
VVsssssk
51b7a6d74a
[Fix] Fix spconv unit test by releasing cache on GPU ( #1872 )
2022-04-14 22:35:29 +08:00
Qiza-lyhm
4826a9b7e4
[Feature] Support PyTorch backend on MLU ( #1770 )
...
* feat(MLU): Support PyTorch backend on MLU
* MMCV support PyTorch backend on MLU
* Add MLUDataParallel and MLUDistributedDataParallel
* Add MLU operator support
* [Fix]: Fix PR comments and add IS_MLU to get device available check
* [Fix]: fix PR comments of dist_utils.py
* [Doc] Rewrite annotations of functions.
* [Docs] Rewrite annotation in distributed.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [Docs] Fix lint
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-04-14 21:48:18 +08:00
Andrew Stahlman
cd9dcc19da
[Enhancement] Speed up Registry initialization ( #1844 )
...
* Speed up Registry initialization
This PR addresses https://github.com/open-mmlab/mmcv/issues/1843 .
Instead of calling inspect.stack() to read the entire stack and its
associated source files from disk, walk up the stack to get only the
specific frame that we need (see [1] for additional information).
This makes imports in downstream projects ~2.5x faster in my local dev
environment. For mmaction2, for example:
Before:
$ python -m timeit -n1 -r1 "from mmaction.apis import init_recognizer, inference_recognizer"
1 loop, best of 1: 1.94 sec per loop
After:
$ python -m timeit -n1 -r1 "from mmaction.apis import init_recognizer, inference_recognizer"
1 loop, best of 1: 754 msec per loop
[1] https://stackoverflow.com/a/42636264/895769
* Add comment with PR tag
Explain why we avoid `inspect.stack()` with link to PR
2022-04-14 14:01:34 +08:00
Song Lin
5cded66a78
Fix docstring ( #1876 )
2022-04-13 19:36:32 +08:00
q.yao
85b37e7ba4
[Enhancment] Optimize correlation op ( #1814 )
...
* optimize forward
* fast backward
* fix bugs of grad input2
2022-04-10 14:38:55 +08:00
Alex Yang
cff3feccbe
[Feature] Support finding free port in _init_dist_slurm() ( #1846 )
...
* [feat]:support find free port in _init_dist_slurm
* fix format
* Update mmcv/runner/dist_utils.py
should support port taken by a non-localhost address.
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* Update dist_utils.py
Add Copyright.
* rename inner function
* Update mmcv/runner/dist_utils.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix dist_utils.py
change _is_port_in_use() criterion.
* Update dist_utils.py
rename _is_port_in_use to _is_free_port
* Update mmcv/runner/dist_utils.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update dist_utils.py
fix lint
* Update dist_utils.py
fix lint
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-04-09 12:53:23 +08:00
Tan SU
c33f248987
[Enhancement] Fix collect_env on Windows ( #1789 )
...
* [fix] fix collect_env() on Windows
* fix(utils): add back 'Cuda compilation tools' to nvcc info
* feat(utils): find default ccompiler
* fix(utils, test): parse cl.exe version instead of path
* fix: code style
* fix(tools): use distutils
* [fix] collect_env() returns GCC or MSVC
* [fix] unitest for collect_env()
* add comments
* test: add GCC to expected_keys
* fix: code style
* Update mmcv/utils/env.py
2022-04-05 16:31:16 +08:00
Jiazhen Wang
e0eebebf50
[Fix] Fix Python3.10 CI ( #1828 )
...
* Fix python3.10 ci
* fix build ci
* fix build ci
* fix onnx build in ci
* remove onnx optimizer
* remove python3.10 ci
* special treatment for py3.10
* fix build ci
* special treatment for python3.10 in requirements/test
* fix requirements/test
2022-04-02 14:22:05 +08:00
Rockey
a02a481576
[Fix] GELU got an unexpected keyword argument 'inplace' ( #1847 )
2022-04-02 14:17:01 +08:00
Zaida Zhou
f2c50930e4
Add a approval button ( #1851 )
2022-04-01 20:01:17 +08:00
Sharpiless
969e2af866
[Feature] Support for linearly learning rate decay ( #1627 )
...
* update support for linearly learning rate decay
* Fix LinearAnnealingLrUpdaterHook, update LinearAnnealingMomentumUpdaterHook, add unit test
add docstring
add docstring
update linear lr momentum schedule test
fix ci
Fix CI
* add lr and momentum hook to runner and hooks package
add lr and momentum hook to runner and hooks package
* replace multi_optimziers with multi_optimizers
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
2022-03-31 09:39:40 +08:00
wulele
c46deb0576
Fixed a typo in multi_scale_deform_attn.py ( #1838 )
2022-03-28 15:35:50 +08:00
Zaida Zhou
25602c6844
bump version to v1.4.8 ( #1836 )
2022-03-26 16:25:59 +08:00
Jiazhen Wang
082dabfd1a
[Fix] Fix _sync_params was removed in torch1.11.0 ( #1816 )
...
* fix pt111 dist
* fix val step
2022-03-26 16:19:45 +08:00
VVsssssk
1a2f174ffe
[Bug] Fix voxelization bug ( #1822 )
...
* fix voxelization bug
* fix code
2022-03-24 21:56:56 +08:00
q.yao
d929fa4136
Fix ms deform attn ( #1823 )
...
* rename grad_sampling_loc and grad_attn_weight
* recover cache initialize
2022-03-24 21:55:33 +08:00
Zaida Zhou
5b5d0c15bc
[Docs] Add more Windows information in README ( #1829 )
...
* [Docs] Add more windows information in README
* minor fix
* rename MacOS to macOS
2022-03-23 23:41:51 +08:00
q.yao
8c23bf140a
Implement corner pool with python for torch<1.5 ( #1772 )
...
* implement corner pool with python for torch<1.5
* fix for torch130
2022-03-22 23:09:35 +08:00
Tan SU
ac52bb3795
[fix] config ignore imported modules and functions ( #1802 )
...
* [fix] config ignore modules and functions
* add unitest
2022-03-22 23:04:55 +08:00
Jiazhen Wang
42062eded5
[Enhancement] Add Python3.10 CI ( #1815 )
...
* add python3.10 ci
* fix github workflow
2022-03-22 23:03:21 +08:00
q.yao
6289b6f922
[Fix] Fix rocm support ( #1704 )
2022-03-21 15:24:22 +08:00
Wenhao Wu
68a2c0a1e2
Update unittest for mmdet3d ops ( #1811 )
2022-03-18 12:52:55 +08:00
Jiazhen Wang
e5ae1bfa8d
[Fix] Remove warnings in compilation ( #1675 )
...
* [Fix] remove warnings in compilation
* [Fix] fix order of statements
* [Fix] fix build error on windows
* cannel buildextension wrapper
2022-03-17 16:58:32 +08:00
Zaida Zhou
e319369068
bump version to v1.4.7 ( #1806 )
2022-03-15 19:26:43 +08:00
Alex Yang
1cd864d634
[Feature] Support shallow copy for Config ( #1796 )
...
* Add .owners.yml to mark daily issue shift
* Update .owners.yml
fix end of file
* Add __copy__() to Config
* fix format in config.py
* fix format in test_copy
* fix format in config.py
* Update config.py
* Update tests/test_utils/test_config.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-03-15 14:25:01 +08:00
Wenhao Wu
b5d550f090
[Feature] Add nondeterministic voxelization op from mmdet3d ( #1783 )
...
* add nondeterministic voxelization op
* fix lint
* fix lint
* resolve comments
* fix lint
2022-03-15 14:21:34 +08:00
Jiazhen Wang
33e14deaea
[Enhancement] Add PyTorch1.11.0 CI ( #1800 )
...
* add pytorch1.11 ci
* fix test parallel
* fix test parallel
2022-03-15 12:38:30 +08:00
Jiazhen Wang
bdabdffcf9
[Fix] Fix deform_conv inconsistent pybind ( #1781 )
2022-03-15 11:15:15 +08:00
Mashiro
2eb0a10d5a
[Feature] Add worker_init_fn ( #1788 )
...
* add worker_init_fn
* "Fix as comment"
* Fix format
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-03-15 11:14:06 +08:00
Vinay Kumar
e8cf961324
[Docs] minor typo fix in docs/en/understand_mmcv/ ( #1798 )
...
minor typo fix in `docs/en/understand_mmcv/data_process.md`
2022-03-14 10:10:53 +08:00
Vinay Kumar
5b7a167c98
[Docs] Fix typo in docs/en/understand_mmcv/cnn.md ( #1799 )
...
Fixed typo in `docs/en/understand_mmcv/cnn.md`. The `BaseModule` class implements `init_weights()` not `init_weight()`
2022-03-14 10:07:23 +08:00
Vinay Kumar
5c5a8e0355
[Docs] Fix minor typo in docs/en/config.md ( #1797 )
...
* minor typo
minor typing bug. replaced `deprecated.py` to `deprecated_cfg.py`
* fixing the typo
as per the example, the directory name is `converters` not `converter`.
2022-03-13 09:22:41 +08:00
Tong Gao
00b003da23
[Docs] Fix a wrong example in DefaultOptimizerConstructor ( #1795 )
2022-03-12 00:21:22 +08:00
Alex Yang
c4b02566cf
Add .owners.yml to dispatch daily issue ( #1775 )
...
* Add .owners.yml to mark daily issue shift
* Update .owners.yml
fix end of file
2022-03-09 17:40:38 +08:00
Wenhao Wu
76e870f17c
[Fix] Fix bugs in Voxelization op ( #1746 )
...
* Fix bugs in Voxelization op
* fix comments
* fix lint
* add comments
2022-03-07 21:08:36 +08:00
Wenhao Wu
09b64a60b0
[Fix] Fix bugs in DynamicScatter op ( #1748 )
...
* Fix bugs in DynamicScatter op
* recover unittest
* add a comment as a reminder
* compatible to torch with lower version
2022-03-07 21:02:38 +08:00
WRH
0394990a47
Include spconv header files in the sdist package ( #1766 )
...
* include spconv/**.h in MANIFEST.in
* add more headers
* fix
* build from sdist in cpu runner
* remove original copy of src code in ci
Co-authored-by: wangruohui <wangruohui@local>
2022-03-07 11:07:40 +08:00
Tan SU
d69d985abd
[Fix] Fix ProfilerHook when using IterBasedRunner ( #1755 )
2022-03-06 20:13:32 +08:00
Xiangxu-0103
466a6c829c
[Fix] fix deconv_flops_counter_hooker ( #1760 )
...
* fix deconv_flops_counter
* Update generalized_attention.py
2022-03-03 20:01:39 +08:00
XiwuChen
ea64b5127c
fix typo in conv.py ( #1759 )
...
Fix typo in conv.py.
2022-03-03 10:40:40 +08:00
saurbhc
34f227efbd
[Feature] Add SegmindLoggerHook ( #1650 )
...
* add SegmindLoggerHook
* update linting for segmind.py
* ran pre-commit
* add test_segmind_hook
- add SegmindLoggerHook import in:
mmcv/runner/__init__.py
mmcv/runner/hooks/__init__.py
mmcv/runner/hooks/logger/__init__.py
* update test_segmind_hook
- Add Docstring to SegmindLoggerHook
- Use get_loggable_tags(...)
* update test_hooks.py & segmind.py
- mmcv/runner/hooks/logger/segmind.py
moved docs from __init__ to class ...
update ImportError line-indentation
remove unwanted method
- tests/test_runner/test_hooks.py
update assert_called_with only on hook.segmind_mlflow_log
* Update tests/test_runner/test_hooks.py
disable yapf on test_hooks.py imports
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/runner/hooks/logger/segmind.py
Update SegmindLoggerHook docstring
Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>
* update before_run method in segmind.py
removed un-used statements
* updated imports in SegmindLoggerHook
* update SegmindLoggerHook
- code cleanup
* update SegmindLoggerHook
- add interval parameter in __init__ method
* update SegmindLoggerHook
- more arguments passes to __init__ method
- interval
- ignore_last
- reset_flag
- by_epoch
* Update mmcv/runner/hooks/logger/segmind.py
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* Update mmcv/runner/hooks/logger/segmind.py
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
2022-03-03 10:01:46 +08:00
Wenhao Wu
4e77382034
support fp16 training with gather_points op ( #1758 )
2022-03-02 17:55:13 +08:00
q.yao
fd3a1a16ea
Add deprecate warning of deployment ( #1750 )
2022-03-01 15:07:07 +08:00