-
Notifications
You must be signed in to change notification settings - Fork 60
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
remove uthash #733
remove uthash #733
Conversation
xxx: I don't really want the commit that moves the unit tests to C++, but due to the stupid "libinternal" library we have, it's easier to just do this than debug autotools/libtool issues. |
g++7 fails to initialize C-style tagged unions with the following error message: > sorry, unimplemented: non-trivial designated initializers not > supported Note that gcc7 handles this fine when the file is parsed as C, as well as g++8 and beyond, and the problem only exists when operating in C++ mode under g++7. AL2 is still using this ancient toolchain, so add a hack in the case that it is used. This is pretty horrible, and should be cleaned up sooner rather than later. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
bad74fc re-triggered -Wnarrowing on rebase. The natural type of the array rvalue here is size_t[] because it's defined in terms of the stripe size, and the stripe size array is size_t[]. The entire rval is then implicitly converted to int[] through assignment, which causes narrowing. Offsets here should just be size_t in the first place, though, as it's what the uut is expecting. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
On builds where lttng is enabled, the inclusion of nccl_ofi_tracepoint.h pulls in <lttng/ust-utils.h>, which defines templates when __cplusplus is defined without restraint. Those templates cannot have C linkage. This file does not really need nccl_ofi_tracepoint.h; it only needs config.h to test for whether NVTX tracing is enabled, and then it needs nvtx3 headers in the case that it is so that it may define storage for the nvtx domain handles. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
All included headers are fully safe to be parsed as C++, so these unit tests can now use C++. Rename them to `.cc' files and use a few c++ keywords to enforce that the compiler is actually treating them as such. Actual C++ cleanups to follow later, hopefully alongside a unit test framework like gtest or catch2. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
39bf7b9
to
70a4020
Compare
implement a small wrapper around std::map, use this instead of uthash. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
apologies on the pushes, a few straggler header changes ended up on the wrong commits. Believe this is done now. |
move rdma.c to c++, move some structs from the header to the unit so that it can use c++ types. Implement ep_addr_list with unordered_map/unordered_set instead of uthashisms. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
there are no remaining consumers of uthash or ep_addr_list after this commits parent. Delete code. Signed-off-by: Nicholas Sielicki <nslick@amazon.com>
* Endpoint rail encapsulates data of an endpoint for a | ||
* specific rail. | ||
*/ | ||
struct nccl_net_ofi_ep_rail { |
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.
I don't think we should make this change. We want to split up rdma.c, not make it harder to split up later.
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.
Even in light of the conversation below, I still have strong feelings on this one. This is not a useful change for us.
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.
Can we put the ep map code into a new file nccl_ofi_rdma_ep_map.{h,c} or some such?
Description of changes:
(builds atop two other branches)
we had two consumers of uthash:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.