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

Remove code for CUDA below 7.5, update version checks #3152

Merged

Conversation

SunBlack
Copy link
Contributor

  • In *.cu files version number of CUDA is stored in CUDART_VERSION (cuda_runtime_api.h) instead of CUDA_VERSION (cuda.h)
  • Remove code for CUDA below CUDA 7.5

Fixes following compile issue I had during building #3140

2>Building NVCC (Device) object gpu/surface/CMakeFiles/pcl_gpu_surface.dir/src/cuda/Release/pcl_gpu_surface_generated_convex_hull.cu.obj
2>convex_hull.cu
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(474): warning : function "__all"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\device_atomic_functions.h(179): here was declared deprecated ("__all() is not valid on compute_70 and above, and should be replaced with __all_sync().To continue using __all(), specify virtual architecture compute_60 when targeting sm_70 and above, for example, using the pair of compiler options: -arch=compute_60 -code=sm_70.")
2>
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(503): warning : function "__ballot"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\sm_20_intrinsics.h(405): here was declared deprecated ("__ballot() is not valid on compute_70 and above, and should be replaced with __ballot_sync().To continue using __ballot(), specify virtual architecture compute_60 when targeting sm_70 and above, for example, using the pair of compiler options: -arch=compute_60 -code=sm_70.")
2>
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(510): warning : function "__ballot"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\sm_20_intrinsics.h(405): here was declared deprecated ("__ballot() is not valid on compute_70 and above, and should be replaced with __ballot_sync().To continue using __ballot(), specify virtual architecture compute_60 when targeting sm_70 and above, for example, using the pair of compiler options: -arch=compute_60 -code=sm_70.")
2>
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(474): warning : function "__all"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\device_atomic_functions.h(179): here was declared deprecated ("__all() is deprecated in favor of __all_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")
2>
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(503): warning : function "__ballot"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\sm_20_intrinsics.h(405): here was declared deprecated ("__ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")
2>
2>D:/pcl/gpu/surface/src/cuda/convex_hull.cu(510): warning : function "__ballot"
2>c:\program files\nvidia gpu computing toolkit\cuda\v10.1\include\sm_20_intrinsics.h(405): here was declared deprecated ("__ballot() is deprecated in favor of __ballot_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")
...

* In *.cu files version number of CUDA is stored in CUDART_VERSION (cuda_runtime_api.h) instead of CUDA_VERSION (cuda.h)
* Remove code for CUDA below CUDA 7.5
@SunBlack
Copy link
Contributor Author

SunBlack commented Jun 13, 2019

During this PR I found a lot of occurences of __CUDA_ARCH__ - I believe we can remove all checks for this, because we require at minimum CUDA 7.5, which supports CUDA ARCH 2.0 at minimum. As far as I understand this documentation __CUDA_ARCH__ will be always >=200 with CUDA 7.5. All checks in PCL are comparing __CUDA_ARCH__ with 200 or 120 or 110, so we always know the result => dead code => can be removed. Should this part of this PR or another PR after this is merged?

@SergioRAgostinho
Copy link
Member

I'm gonna merge this now because this code is not being built on the CI. Just open a new PR.

@SergioRAgostinho SergioRAgostinho merged commit 7a31f63 into PointCloudLibrary:master Jun 13, 2019
@SunBlack SunBlack deleted the fix_cuda_version_check branch June 13, 2019 13:36
@taketwo taketwo changed the title Fix/Update CUDA version check Remove code for CUDA below 7.5, update version checks Jan 14, 2020
@taketwo taketwo changed the title Remove code for CUDA below 7.5, update version checks Raise minimum required CUDA versiot to 7.5 Jan 18, 2020
@taketwo taketwo changed the title Raise minimum required CUDA versiot to 7.5 Remove code for CUDA below 7.5, update version checks Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants