Skip to content

Workaround CUDA warning. #8696

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

Merged
merged 1 commit into from
Jan 19, 2023
Merged

Workaround CUDA warning. #8696

merged 1 commit into from
Jan 19, 2023

Conversation

trivialfis
Copy link
Member

cc @rongou

@trivialfis trivialfis requested a review from hcho3 January 18, 2023 22:00
@trivialfis
Copy link
Member Author

/home/jiaming/Workspace/XGBoost/xgboost/tests/cpp/data/../../../src/data/array_interface.h(540): warning #20011-D: calling a __host__ function("auto xgboost::ArrayInterface<(int)2, (bool)0> ::Initialize(const     ::std::map<   ::std::__cxx11::basic_string<char,     ::std::char_traits<char> , ::std::allocator<char> > ,  ::xgboost::Json,     ::std::less<void> , ::std::allocator<    ::std::pair<const    ::std::__cxx11::basic_string<char,     ::std::char_traits<char> , ::std::allocator<char> > ,  ::xgboost::Json> > >  &)::[lambda(const T1 *) (instance 1)]::operator ()<unsigned long> (const T1 *) const") from a __host__ __device__ function("xgboost::ArrayInterface<(int)2, (bool)0> ::DispatchCall< ::xgboost::ArrayInterface<(int)2, (bool)0> ::Initialize(const     ::std::map<   ::std::__cxx11::basic_string<char,     ::std::char_traits<char> , ::std::allocator<char> > ,  ::xgboost::Json,     ::std::less<void> , ::std::allocator<    ::std::pair<const    ::std::__cxx11::basic_string<char,     ::std::char_traits<char> , ::std::allocator<char> > ,  ::xgboost::Json> > >  &)   ::[lambda(const T1 *) (instance 1)]>  const") is not allowed

@rongou
Copy link
Contributor

rongou commented Jan 18, 2023

Is the warning still there? CUDA seems to be pretty picky about using a lambda.

@trivialfis
Copy link
Member Author

it's removed.

@trivialfis trivialfis merged commit 7a068af into dmlc:master Jan 19, 2023
@trivialfis trivialfis deleted the cuda-warning branch January 19, 2023 01:16
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Feb 5, 2023
trivialfis added a commit that referenced this pull request Feb 6, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…8734)

* [backport] Make sure input numpy array is aligned. (#8690)

- use `np.require` to specify that the alignment is required.
- scipy csr as well.
- validate input pointer in `ArrayInterface`.

* Workaround CUDA warning. (#8696)

* backport from half type support for alignment.

* fix import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants