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

fix cuda compile error #891

Merged
merged 7 commits into from
Apr 12, 2021
Merged

fix cuda compile error #891

merged 7 commits into from
Apr 12, 2021

Conversation

SFMDI
Copy link
Contributor

@SFMDI SFMDI commented Mar 16, 2021

to eliminate cuda compilation errors in the latest version of Visual Studio 16.9

Code modified to address the following issues
Fixes #888

to eliminate cuda compilation errors in the latest version of Visual Studio 16.9
@CLAassistant
Copy link

CLAassistant commented Mar 16, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Mar 16, 2021

Codecov Report

Merging #891 (d0cb25e) into master (03491ed) will increase coverage by 0.80%.
The diff coverage is 66.94%.

❗ Current head d0cb25e differs from pull request most recent head 2c496b6. Consider uploading reports for the commit 2c496b6 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #891      +/-   ##
==========================================
+ Coverage   64.86%   65.66%   +0.80%     
==========================================
  Files         148      149       +1     
  Lines        9189     9447     +258     
  Branches     1647     1718      +71     
==========================================
+ Hits         5960     6203     +243     
- Misses       2902     2924      +22     
+ Partials      327      320       -7     
Flag Coverage Δ
unittests 65.66% <66.94%> (+0.80%) ⬆️

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

Impacted Files Coverage Δ
mmcv/cnn/bricks/conv.py 100.00% <ø> (ø)
mmcv/engine/test.py 26.88% <26.88%> (ø)
mmcv/ops/deform_conv.py 61.76% <31.25%> (-4.36%) ⬇️
mmcv/runner/hooks/logger/wandb.py 68.75% <40.00%> (-6.25%) ⬇️
mmcv/runner/hooks/momentum_updater.py 60.60% <58.33%> (+2.27%) ⬆️
mmcv/runner/hooks/lr_updater.py 65.78% <62.22%> (+8.96%) ⬆️
mmcv/onnx/symbolic.py 40.60% <75.00%> (+0.71%) ⬆️
mmcv/runner/hooks/evaluation.py 87.24% <87.24%> (ø)
mmcv/cnn/__init__.py 100.00% <100.00%> (ø)
mmcv/cnn/builder.py 100.00% <100.00%> (ø)
... and 18 more

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 03491ed...2c496b6. Read the comment docs.

@wangruohui
Copy link
Member

wangruohui commented Mar 17, 2021

Basically, this MR modify all floor and ceil to floorf and ceilf to force to call the implementation for single precision, thus can avoid some problem on Windows. Based on comments from other users, this modification works and seems pass all tests.
But I am not sure whether this change affect behavior when meeting double or half.

@ZwwWayne
Copy link
Collaborator

Hi @SFMDI ,
Thanks for your kind contribution. Could you sing the CLA and fix the lint?

@ZwwWayne
Copy link
Collaborator

Basically, this MR modify all floor and ceil to floorf and ceilf to force to call the implementation for single precision, thus can avoid some problem on Windows. Based on comments from other users, this modification works and seems pass all tests.
But I am not sure whether this change affect behavior when meeting double or half.

Usually DCN with FP16 training is not tried. We may arrange some benchmarks on that if necessary.

@RunningLeon
Copy link
Collaborator

@grimoire Could you take a look at this PR and the issue?

@grimoire
Copy link
Member

grimoire commented Mar 20, 2021

If you are worrying about half and double precision, could we cast the tensor dtype in deform_conv_cuda.cu DeformConvForwardCUDAKernelLauncher before feeding the tensor into the kernel?

@wangruohui
Copy link
Member

@SFMDI
Hello, this MR is currently blocked because you haven't signed CLA . Would you please make it signed to unblock this MR? Thank you!

@SFMDI
Copy link
Contributor Author

SFMDI commented Mar 31, 2021

@wangruohui
I just signed CLA

.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ZwwWayne ZwwWayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit-config.yaml should be recovered. The lint issue should be fixed. For cpp code we use google style and it can be reformated in VSCode.

@OpenMMLab-Assistant-007
Copy link

Hi!
@SFMDI
First of all, we want to express our gratitude for your significant PR in the OpenMMLab project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.

We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA

If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution❤

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