Workaround for nvcomp zstd overwriting blocks for orc due to underestimate of sizes - #11288
Conversation
|
I think I might put up a less hacky alternative that just adds a boolean |
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #11288 +/- ##
================================================
+ Coverage 86.34% 86.40% +0.06%
================================================
Files 144 143 -1
Lines 22826 22753 -73
================================================
- Hits 19708 19659 -49
+ Misses 3118 3094 -24
Continue to review full report at Codecov.
|
|
The build error looks like it is unrelated to this change. I think it is related to #11025. |
|
rerun tests |
devavret
left a comment
There was a problem hiding this comment.
Looks good. Just needs a test
|
@devavret I have added a test and verified it fails without this fix and passes with it. One issue with the current test is that it assumes ZSTD compression is supported for ORC. Currently, it will fail if you build with a version of nvcomp that does not support ZSTD. Maybe that is acceptable for a test? I tried it by compiling with nvcomp-2.2, and it failed with this: |
|
rerun tests |
1 similar comment
|
rerun tests |
|
Seems like we want the |
|
Another alternative is to replicate this code from nvcomp_adapter.cpp in orc_test.cpp: Let me know what you guys prefer. |
|
rerun tests |
vuule
left a comment
There was a problem hiding this comment.
Looks good, just a few suggestions.
I slightly prefer moving |
vuule
left a comment
There was a problem hiding this comment.
Changed my mind about the macros. This looks good 👍
|
Thanks for the review @vuule! I was in the process of putting up a change where I just added the include check to orc_test.cpp while you were reviewing, so I didn't see this comment. I can definitely change it to move the defines if you prefer that. |
|
@gpucibot merge |
|
@gpucibot merge |
This is a possible workaround for issue #11280. We have a goal to support NVCOMP ZSTD in 22.08, so a short-term fix is desired.
There is a heuristic in
gpuParseCompressedStripeDatato estimate the size of the decompress buffer for very small compressed blocks. For ZSTD, it is possible to have a high enough compression ratio that this heuristic underestimates the needed decompress size.This pr adds a boolean parameter to allow us to disable the block size estimate for ZSTD. When the estimate is disabled, it falls back to the maximum block size, which is guaranteed to be big enough.
cc: @devavret, @vuule