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

[NFC] Modularize <exception> #199

Merged
merged 17 commits into from
Apr 2, 2024
Merged

Conversation

miscco
Copy link
Collaborator

@miscco miscco commented Jul 11, 2023

This PR modularizes header that are currently only used internally.

Those are <exception>, <new> and <stdexcept>. With the changes here, we can include those headers even in __cuda_std__ mode without breaking anything

@miscco miscco added the libcu++ For all items related to libcu++ label Jul 11, 2023
@miscco miscco self-assigned this Jul 11, 2023
@miscco miscco linked an issue Jul 11, 2023 that may be closed by this pull request
1 task
@miscco miscco requested review from a team as code owners July 18, 2023 17:34
@miscco miscco requested review from robertmaynard, alliepiper and ericniebler and removed request for a team July 18, 2023 17:34
@miscco
Copy link
Collaborator Author

miscco commented Jul 18, 2023

Note: Those headers and features are currently not exported thorugh libcu++ so running tests is not necessary

@miscco miscco force-pushed the modularize_exception branch 6 times, most recently from 6453a92 to cf6394a Compare February 23, 2024 10:41
@miscco
Copy link
Collaborator Author

miscco commented Mar 1, 2024

ping @griwes @wmaxey

I want this in as a prerequisite to exposing <new> internally

@miscco miscco force-pushed the modularize_exception branch 8 times, most recently from fe2608b to 0b483f2 Compare March 15, 2024 09:06
Comment on lines +33 to +45
#if !defined(__cpp_sized_deallocation) || __cpp_sized_deallocation < 201309L
#define _LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION
#endif

#if !defined(_LIBCUDACXX_BUILDING_LIBRARY) && _CCCL_STD_VER < 2014 && \
defined(_LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
# define _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
#endif

#if defined(_LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION) || \
defined(_LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
# define _LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if this should go in __config instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is only ever used here and we cannot generically overload operator new on device anyway, so I would prefer to keep that located here

Copy link

copy-pr-bot bot commented Apr 2, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@miscco miscco force-pushed the modularize_exception branch 3 times, most recently from 8251934 to beab332 Compare April 2, 2024 08:18
@miscco
Copy link
Collaborator Author

miscco commented Apr 2, 2024

/ok to test

@miscco miscco merged commit 5c482b2 into NVIDIA:main Apr 2, 2024
584 checks passed
@miscco miscco deleted the modularize_exception branch April 2, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libcu++ For all items related to libcu++
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FEA]: Make <exception> and <stdexcept> usable internally
3 participants