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

Ignore include/rapids/ in clang-tidy to avoid picking up libcudacxx. #5659

Closed

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Nov 17, 2023

After rmm#1095, cuml started picking up the rmm conda package's libcudacxx headers. This causes clang-tidy to fail. This PR adds an ignore for include/rapids/ where all CCCL headers are packaged.

@bdice
Copy link
Contributor Author

bdice commented Nov 17, 2023

Error details

Exception: clang-tidy failed! Refer to the errors above.
---------------- File:/__w/cuml/cuml/cpp/src/experimental/fil/infer0.cpp PASSED ----------------
---------------- File:/__w/cuml/cuml/cpp/src/experimental/fil/infer5.cpp PASSED ----------------
---------------- File:/__w/cuml/cuml/cpp/src/experimental/fil/infer4.cpp PASSED ----------------
---------------- File:/__w/cuml/cuml/cpp/src/experimental/fil/infer6.cpp PASSED ----------------
---------------- File:/__w/cuml/cuml/cpp/src/experimental/fil/infer7.cpp PASSED ----------------
---------------- File:/__w/cuml/cuml/cpp/src/common/cuml_api.cpp FAILED ----------------
CMD: clang-tidy -header-filter='.*cuml/cpp/(src|include|bench|comms).*' /__w/cuml/cuml/cpp/src/common/cuml_api.cpp -- clang-cpp -std=c++17 -DCUML_C_API -DCUML_ENABLE_GPU -DCUTLASS_NAMESPACE=raft_cutlass -DDISABLE_CUSPARSE_DEPRECATED -DFMT_HEADER_ONLY=1 -DFMT_SHARED -DLIBCUDACXX_ENABLE_EXPERIMENTAL_MEMORY_RESOURCE -DRAFT_COMPILED -DRAFT_SYSTEM_LITTLE_ENDIAN=1 -DSPDLOG_FMT_EXTERNAL -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CUDA -DTHRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_CPP -Dcuml_EXPORTS -I/__w/cuml/cuml/cpp/src -I/__w/cuml/cuml/cpp/include -I/opt/conda/envs/clang_tidy/include/rapids/libcudacxx -I/opt/conda/envs/clang_tidy/include/rapids -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/conda/envs/clang_tidy/include -isystem /usr/local/cuda/include -O3 -DNDEBUG -fPIC -pthread -fopenmp -I /opt/conda/envs/clang_tidy/include/ClangHeaders /__w/cuml/cuml/cpp/src/common/cuml_api.cpp: 11 errors generated.
Error while processing /__w/cuml/cuml/cpp/src/common/cuml_api.cpp.
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/is_referenceable.h:30:65: error: '_Tp' does not refer to a value [clang-diagnostic-error]
  : public integral_constant<bool, _LIBCUDACXX_IS_REFERENCEABLE(_Tp)>
                                                                ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/is_referenceable.h:28:17: note: declared here
template <class _Tp>
                ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:36:27: error: unknown type name '__make_unsigned' [clang-diagnostic-error]
using __make_unsigned_t = _LIBCUDACXX_MAKE_UNSIGNED(_Tp);
                          ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__config:744:40: note: expanded from macro '_LIBCUDACXX_MAKE_UNSIGNED'
#define _LIBCUDACXX_MAKE_UNSIGNED(...) __make_unsigned(__VA_ARGS__)
                                       ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:84:41: error: no template named '__make_unsigned_t' [clang-diagnostic-error]
  using type _LIBCUDACXX_NODEBUG_TYPE = __make_unsigned_t<_Tp>;
                                        ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:88:46: error: no template named '__make_unsigned_t' [clang-diagnostic-error]
template <class _Tp> using make_unsigned_t = __make_unsigned_t<_Tp>;
                                             ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:94:1: error: no template named '__make_unsigned_t' [clang-diagnostic-error]
__make_unsigned_t<_Tp> __to_unsigned_like(_Tp __x) noexcept {
^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:95:24: error: no template named '__make_unsigned_t' [clang-diagnostic-error]
    return static_cast<__make_unsigned_t<_Tp> >(__x);
                       ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__functional/../__utility/../__type_traits/../__type_traits/make_unsigned.h:100:68: error: use of undeclared identifier '__make_unsigned_t' [clang-diagnostic-error]
using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, __make_unsigned_t<_Up>, _Up>;
                                                                   ^
/opt/conda/envs/clang_tidy/include/rapids/libcudacxx/cuda/std/detail/libcxx/include/__type_traits/make_32_64_or_128_bit.h:38:3: error: no template named '__copy_unsigned_t' [clang-diagnostic-error]
  __copy_unsigned_t<_Tp,
  ^

@bdice bdice added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 17, 2023
@vyasr
Copy link
Contributor

vyasr commented Nov 17, 2023

This looks good to me but I'll wait on CI to pass before approving.

@bdice bdice requested a review from a team as a code owner November 17, 2023 17:03
@csadorf
Copy link
Contributor

csadorf commented Nov 17, 2023

Superseded by #5661 .

@csadorf csadorf closed this Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CUDA/C++ improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants