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 crashes appearing on CUDA CC 7 cards. #67

Merged
merged 5 commits into from
Feb 5, 2020
Merged

Conversation

griwodz
Copy link
Member

@griwodz griwodz commented Dec 18, 2019

Fixes the 2 issues with RTX 2080 that were reported and discussed in Issue #64

@griwodz griwodz mentioned this pull request Dec 18, 2019
@griwodz griwodz added bugfix cuda issues related to cuda versions prio:critical labels Dec 18, 2019
@griwodz
Copy link
Member Author

griwodz commented Dec 18, 2019

The checks are failing in an apt-get update. What can I do about that?

@griwodz
Copy link
Member Author

griwodz commented Dec 19, 2019

@simogasp may have observed a slowdown. While the changes were tiny, I noticed a little overhead in s_desc_loop.cu. popsift::any() implies a __syncwarp(), and __syncthreads() isn't actually required. So I moved syncthreads() out of the loop. Also I revised the indentation, which makes it a lot easier to see how small the change is with respect to develop.

@simogasp simogasp added this to the v1.0.0 milestone Jan 17, 2020
@simogasp
Copy link
Member

simogasp commented Feb 3, 2020

@griwodz shall we also update the cmake to specify the architectures to build according to the CUDA version? As of now, CCs > 6.5 are not built.

@griwodz
Copy link
Member Author

griwodz commented Feb 3, 2020

It seems to work safely on everything up to CC 7.5 now, so it's probably a good idea.

Copy link
Member

@simogasp simogasp left a comment

Choose a reason for hiding this comment

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

LGTM

As for cmake what about changing those lines to:

set(PopSift_CUDA_CC_LIST_BASIC 30 35 50 52 )
# versions greater than 7 support at least up to 6.x
if(CUDA_VERSION_MAJOR GREATER 7)
  list(APPEND PopSift_CUDA_CC_LIST_BASIC 60 61 62)
endif()
# versions greater than 8 support at least up to 7.2
if(CUDA_VERSION_MAJOR GREATER 8)
  list(APPEND PopSift_CUDA_CC_LIST_BASIC 70 72)
endif()
# versions greater than 9 support at least up to 7.5
if(CUDA_VERSION_MAJOR GREATER 9)
  list(APPEND PopSift_CUDA_CC_LIST_BASIC 75)
endif()

(info from here https://en.wikipedia.org/wiki/CUDA#GPUs_supported)

@@ -66,8 +66,8 @@ class Warp32
: ( my_val < other_val );
const bool must_swap = not ( my_more ^ reverse ^ increasing );

return ( must_swap ? popsift::shuffle_xor( my_index, 1 << shift )
: my_index );
int lane = must_swap ? ( 1 << shift ) : 0;
Copy link
Member

Choose a reason for hiding this comment

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

const int lane

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we make a new PR for CMake and and the const?
I'm abroad and cannot test anything and I believe having the RTX fix merged is a good idea.
The APPEND needs a bit of testing because some of the CCs won't work. 32, 53, 62 and 72 are CC specific to the Tegra, which is an ARM-based system-on-a-chip and cannot do everything that I've used in PopSift. CC 52, on the other hand, should work.

Copy link
Member

Choose a reason for hiding this comment

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

Oh yes, I've just listed the CC based on the cuda support, I had no idea which one should or should not be included. It was more to propose a different way to add the relevant CC.

Just out of curiosity, the tests that I ran were on an RTX 2080 without the proper CC set (7.5), do you think there is a significant difference when running the code from another CC that is not the one proper to the card? (i.e. should I expect that it runs even faster? :-) )

I'm not in a hurry to merge it, we can keep it here and merge it later.

@fabiencastan fabiencastan merged commit d143285 into develop Feb 5, 2020
@fabiencastan fabiencastan deleted the fix/cc7support branch February 5, 2020 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix cuda issues related to cuda versions prio:critical
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants