-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[core] Add more debug string types #47928
[core] Add more debug string types #47928
Conversation
af5ffa4
to
f7407bc
Compare
f7407bc
to
e22b951
Compare
Signed-off-by: dentiny <[email protected]>
e22b951
to
f9ca13e
Compare
@@ -93,10 +103,19 @@ std::ostream &operator<<(std::ostream &os, DebugStringWrapper<std::tuple<Ts...>> | |||
return os; | |||
} | |||
|
|||
template <typename T, std::size_t N> | |||
std::ostream &operator<<(std::ostream &os, DebugStringWrapper<std::array<T, N>> c) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have any usage of this specialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR, I'm trying to add well-known types to debug string.
I feel we can use our dev times more conservatively - only add a specialization when we need one. Similarly, we can split the build target but it should not help much since this header file is compiled with callers anyway (so all downstreams are rebuilt). Since this PR is already out we can merge it but for other ideas let's create a PR to track it (as P2) and I will find some other issues for you. |
The best way is to templatize it, like the example I showed you last time;
Thank you!
Yes all downstream targets will be rebuilt, but that's oneshot effect. I also notice we don't use static link for |
Signed-off-by: dentiny <[email protected]>
Signed-off-by: dentiny <[email protected]>
The reason why I care so much about bazel target granularity is every time I try to build GCS job manager and utils targets, it's taking me 20-30 minutes, depending on cache hit rate. |
Signed-off-by: dentiny <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on ray-project#47893, add more "blessed container types" to debug string function. Signed-off-by: dentiny <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Followup on #47893, add more "blessed container types" to debug string function.
Share some of my thoughts (some are irrelevant to this PR):
std::byte
, enum, types which supports absl stringify, fallback printer (which prints type and address, like python) if non existing printer matches;ray/src/ray/util/logging.h
Lines 151 to 154 in 4ab6b7c
src/ray/util
are contained in one single giant target, which greatly increase the compilation, link and test time