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 fix] fixed fp16 inference #497

Merged
merged 2 commits into from
Apr 24, 2021
Merged

Conversation

xvjiarui
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #497 (894dbb9) into master (1483720) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #497      +/-   ##
==========================================
- Coverage   86.51%   86.47%   -0.04%     
==========================================
  Files          97       98       +1     
  Lines        4967     5133     +166     
  Branches      806      829      +23     
==========================================
+ Hits         4297     4439     +142     
- Misses        517      535      +18     
- Partials      153      159       +6     
Flag Coverage Δ
unittests 86.47% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmseg/datasets/pascal_context.py 76.47% <0.00%> (-3.53%) ⬇️
mmseg/datasets/pipelines/transforms.py 97.12% <0.00%> (-0.87%) ⬇️
mmseg/models/backbones/__init__.py 100.00% <0.00%> (ø)
mmseg/models/backbones/vit.py 87.97% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1483720...894dbb9. Read the comment docs.

@clownrat6
Copy link
Contributor

clownrat6 commented Apr 21, 2021

Re-Benchmark

The benchmark testing is conducted on NVIDIA® Tesla® V100.

Pytorch 1.8 + Cuda10.1

Cityscapes

Method Backbone Crop Size Lr schd Mem (GB) Inf time (fps) mIoU mIoU(ms+flip)
FCN R-101-D8 512x1024 80000 5.37 8.64 77.32 78.46
PSPNet R-101-D8 512x1024 80000 5.34 8.77 79.22 80.33
DeepLabV3 R-101-D8 512x1024 80000 5.75 3.86 80.73 81.82
DeepLabV3+ R-101-D8 512x1024 80000 6.35 7.87 80.29 80.98

Pytorch 1.5 + Cuda10.1

Cityscapes

Method Backbone Crop Size Lr schd Mem (GB) Inf time (fps) mIoU mIoU(ms+flip)
FCN R-101-D8 512x1024 80000 5.50 8.26 78.02 78.89
PSPNet R-101-D8 512x1024 80000 5.47 8.69 79.28 80.62
DeepLabV3 R-101-D8 512x1024 80000 5.91 3.66 79.97 81.04
DeepLabV3+ R-101-D8 512x1024 80000 6.46 7.48 79.96 80.89

@clownrat6
Copy link
Contributor

Pytorch 1.3 + Cuda10.1

When I run tools/benchmark.py [config_path] [ckpt_path], there comes an error:

Traceback (most recent call last):                                                                                                                
  File "tools/benchmark.py", line 85, in <module>                                                                                                                                                           
    main()                                                                                                                                                                                                  
  File "tools/benchmark.py", line 66, in main                                                                                                                                                               
    model(return_loss=False, rescale=True, **data)                                                                                                                                                          
  File "/mnt/cache/chengzesen/anaconda3/envs/pt1.3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__                                                                           
    result = self.forward(*input, **kwargs)                                                                                                                                                                 
  File "/mnt/cache/chengzesen/workspace/mmcv/mmcv/parallel/data_parallel.py", line 42, in forward                                                                                                           
    return super().forward(*inputs, **kwargs)                                                                                                                                                               
  File "/mnt/cache/chengzesen/anaconda3/envs/pt1.3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward                                                                    
    return self.module(*inputs[0], **kwargs[0])                                                                                                                                                             
  File "/mnt/cache/chengzesen/anaconda3/envs/pt1.3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__                                                                           
    result = self.forward(*input, **kwargs)                                                                                                                                                                 
  File "/mnt/cache/chengzesen/workspace/mmcv/mmcv/runner/fp16_utils.py", line 124, in new_func                                                                                                              
    output = old_func(*new_args, **new_kwargs)                                                                                                                                                              
  File "/mnt/cache/chengzesen/workspace/mmsegmentation/mmseg/models/segmentors/base.py", line 124, in forward                                                                                               
    return self.forward_test(img, img_metas, **kwargs)                                                                                                                                                      
  File "/mnt/cache/chengzesen/workspace/mmsegmentation/mmseg/models/segmentors/base.py", line 106, in forward_test                                                                                          
    return self.simple_test(imgs[0], img_metas[0], **kwargs)                                                                                                                                                
  File "/mnt/cache/chengzesen/workspace/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py", line 271, in simple_test                                                                                
    seg_pred = seg_logit.argmax(dim=1)                                                                                                                                                                      
RuntimeError: "argmax_cuda" not implemented for 'Half'

@xvjiarui xvjiarui merged commit 89f8a6a into open-mmlab:master Apr 24, 2021
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
wjkim81 pushed a commit to wjkim81/mmsegmentation that referenced this pull request Dec 3, 2023
sibozhang pushed a commit to sibozhang/mmsegmentation that referenced this pull request Mar 22, 2024
)

* add solution for markdown-lint issue

* add setup

* simplify ruby install
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

Successfully merging this pull request may close these issues.

2 participants