-
Notifications
You must be signed in to change notification settings - Fork 912
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
Clean up namespaces and improve compression-related headers #17621
base: branch-25.02
Are you sure you want to change the base?
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
device_span<device_span<uint8_t const>> inflate_in_view{inflate_in.data(), | ||
num_compressed_blocks}; | ||
device_span<device_span<uint8_t>> inflate_out_view{inflate_out.data(), num_compressed_blocks}; |
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.
unrelated to header changes, just noticed that the spans are created for no reason here.
@@ -44,7 +45,11 @@ namespace io { | |||
namespace orc { | |||
namespace gpu { | |||
|
|||
namespace nvcomp = cudf::io::detail::nvcomp; |
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 love that we have an internal namespace with the same name as nvcomp's own C++ namespace. This feels like it's asking for a resolution error to occur eventually. At the same time, I don't feel strongly enough to request a change.
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've thought about this (briefly :D ), and went ahead because I've never seen a namespace in nvcomp; the header files we include are extern "C" {
in the global namespace. Also, no file outside of the adapter should include anything from nvcomp.
FWIW, these files should stop depending on the nvcomp adapter (and thus the namespace) once I implement the high-level API that uses nvcomp transparently.
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.
all that said, I should have used a different name :D
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 checked that nvcomp.hpp
has namespace nvcomp
, but I did not look at whether it has extern C
. Let’s not worry unless it presents problems.
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.
one non-blocking question otherwise looks good
if (log_cyclecount) { | ||
results[strm_id].reserved = clock() - s->tstart; | ||
} else { | ||
results[strm_id].reserved = 0; | ||
} |
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.
Has the cycle count logic been relocated elsewhere, or is it simply being removed?
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.
Good question, I forgot to comment on this.
It's removed: It's unused and keeping it just adds noise to the future API changes.
Co-authored-by: Bradley Dice <[email protected]>
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.
Confirm that this does not break spark-rapids-jni
build.
Description
Moved compression-related stuff that was under
cudf::io
tocudf::io::detail
.Moved the nvcomp adapter from
cudf::io::nvcomp
tocudf::io::detail::nvcomp
.Extract common compression constants to appropriate headers, and updated the files to include what they use.
Changes are made in preparation for adding higher-level compression API that abstracts nvcomp use and simplifies caller code.
Checklist