Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Notify users that CUB_NS_QUALIFIER must be set when using other NS macros #350

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

alliepiper
Copy link
Collaborator

No description provided.

@alliepiper alliepiper added this to the 1.14.0 milestone Jul 27, 2021
alliepiper added a commit to alliepiper/thrust that referenced this pull request Jul 27, 2021
@alliepiper
Copy link
Collaborator Author

DVS CL: 30228013
gpuCI: NVIDIA/thrust#1495

@alliepiper alliepiper force-pushed the missing_qualifier_macro_notice branch from cafb0ec to 6c7b8be Compare July 27, 2021 01:30
alliepiper added a commit to alliepiper/thrust that referenced this pull request Jul 27, 2021
@alliepiper alliepiper added testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS). labels Jul 27, 2021
Copy link
Collaborator

@gevtushenko gevtushenko left a comment

Choose a reason for hiding this comment

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

That's an important change!

@alliepiper alliepiper merged commit 94a50bf into NVIDIA:main Jul 28, 2021
@alliepiper alliepiper deleted the missing_qualifier_macro_notice branch July 28, 2021 18:14
facebook-github-bot pushed a commit to pytorch/FBGEMM that referenced this pull request May 6, 2022
Summary:
Since CUB1.14.0, there is a breaking change: NVIDIA/cub#350: When the CUB_NS_[PRE|POST]FIX macros are set, CUB_NS_QUALIFIER must also be defined to the fully qualified CUB namespace (e.g. #define CUB_NS_QUALIFIER ::foo::cub).

Without the fix, on CUDA11.6, the fbgemm_gpu fail to build with following errors:

>                  from /usr/local/cuda/include/cub/device/device_radix_sort.cuh:40,
>                      from ../../../src/split_embeddings_cache_cuda.cu:10:
>     /usr/local/cuda-11.6/targets/x86_64-linux/include/cub/util_namespace.cuh:46:2: error: #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined.
>        46 | #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined.
>           |  ^~~~~
>     [3/169] Building CUDA object CMakeFiles/fbgemm_gpu_py.dir/src/layout_transform_ops.cu.o
>     FAILED: CMakeFiles/fbgemm_gpu_py.dir/src/layout_transform_ops.cu.o
>     /usr/local/cuda/bin/nvcc  -DFBGEMM_CUB_USE_NAMESPACE -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_C10D_NCCL -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -Dfbgemm_gpu_py_EXPORTS -I/code/FBGEMM/fbgemm_gpu -I/code/FBGEMM/fbgemm_gpu/include -I/code/FBGEMM/include -I/code/FBGEMM/third_party/asmjit/src -I/code/FBGEMM/third_party/cpuinfo/include  -isystem=/usr/local/lib/python3.8/dist-packages/torch/include -isystem=/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -isystem=/usr/local/cuda/include -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=implicit_return_from_non_void_function,--diag_suppress=unsigned_compare_with_zero,--diag_suppress=declared_but_not_referenced,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -O3 -DNDEBUG -Xcompiler=-fPIC   -D_GLIBCXX_USE_CXX11_ABI=1 --expt-relaxed-constexpr -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -x cu -c ../../../src/layout_transform_ops.cu -o CMakeFiles/fbgemm_gpu_py.dir/src/layout_transform_ops.cu.o && /usr/local/cuda/bin/nvcc  -DFBGEMM_CUB_USE_NAMESPACE -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_C10D_NCCL -DUSE_DISTRIBUTED -DUSE_RPC -DUSE_TENSORPIPE -Dfbgemm_gpu_py_EXPORTS -I/code/FBGEMM/fbgemm_gpu -I/code/FBGEMM/fbgemm_gpu/include -I/code/FBGEMM/include -I/code/FBGEMM/third_party/asmjit/src -I/code/FBGEMM/third_party/cpuinfo/include  -isystem=/usr/local/lib/python3.8/dist-packages/torch/include -isystem=/usr/local/lib/python3.8/dist-packages/torch/include/torch/csrc/api/include -isystem=/usr/local/cuda/include -DONNX_NAMESPACE=onnx_c2 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_80,code=sm_80 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=integer_sign_change,--diag_suppress=useless_using_declaration,--diag_suppress=set_but_not_used,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=implicit_return_from_non_void_function,--diag_suppress=unsigned_compare_with_zero,--diag_suppress=declared_but_not_referenced,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -O3 -DNDEBUG -Xcompiler=-fPIC   -D_GLIBCXX_USE_CXX11_ABI=1 --expt-relaxed-constexpr -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -x cu -M ../../../src/layout_transform_ops.cu -MT CMakeFiles/fbgemm_gpu_py.dir/src/layout_transform_ops.cu.o -o CMakeFiles/fbgemm_gpu_py.dir/src/layout_transform_ops.cu.o.d
>     In file included from /usr/local/cuda/include/cub/device/../util_arch.cuh:37,
>                      from /usr/local/cuda/include/cub/device/../config.cuh:35,
>                      from /usr/local/cuda/include/cub/device/device_scan.cuh:40,
>                      from ../../../src/layout_transform_ops.cu:10:
>     /usr/local/cuda/include/cub/device/../util_namespace.cuh:46:2: error: #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined.
>        46 | #error CUB requires a definition of CUB_NS_QUALIFIER when CUB_NS_PREFIX/POSTFIX are defined.
>           |  ^~~~~
>     [4/169] Building CXX object CMakeFiles/fbgemm_gpu_py.dir/src/cpu_utils.cpp.o

https://github.com/NVIDIA/cub/releases/tag/1.14.0

Pull Request resolved: #1101

Reviewed By: brad-mengchi

Differential Revision: D36189683

Pulled By: jianyuh

fbshipit-source-id: 11286fe3923972fd5f5f332649716e7f2d6e206a
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: gpuCI passed Passed gpuCI testing. testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants