-
Notifications
You must be signed in to change notification settings - Fork 145
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
ZFP header for GPU compression #77
Comments
I can confirm this incorrect behavior. Let us look into it and see if we can get you a patch. |
A quick inspection reveals that Although this should clearly be fixed, a short-term solution might be to address this in the zfp utility or by making some additional memory copies on the host to concatenate the compressed stream to any data already written to the stream. Let me think about this. Of course, another workaround is to not use headers with CUDA. Depending on your application, that may or may not be a satisfactory interim solution. |
Thanks for the quick response @lindstro Indeed for the application I am working on a header is not strictly necessary (although it would be the most elegant solution). I was currently working on something in the ways of the short term solution you mentioned, but was unsuccessful. As simply copying the raw Thanks again for confirming this behaviour, I will go with the last workaround, and if a patch comes up I'll incorporate it to the wrappers. |
@vkrGitHub I think the decompression issue you're seeing may have something to do with word alignment. Does this issue occur also if you generate the compressed file (with a header) on the host? Either way, we are working the issue but it will likely take a couple of weeks until we have a fix. |
Sorry for the late reply. I can confirm it does not occur when using a header to compress/decompress using host functions. |
My apologies--my question wasn't very precise. What happens if you perform compression (including generation of a header) on the host and then perform decompression on the device? |
@vkrGitHub Thanks for sharing these results. Yeah, I believe both the compressor and decompressor ignore the current bit stream offset and start (de)compression at offset zero. It's akin to implementing Are you OK with calling Not very clean, but a temporary workaround. |
Thank you for the suggested workaround, @lindstro . I managed to do what I was supposed to do by using a custom header prepended to raw I tried the workaround but did not manage to make it work. Right now, and as the problem is fixed, I don't have the time (probably the time+skill) to dig deeper into the proposed solution. Below is my (hacky) attempt, just for the discussion's sake... If a solution pops up quickly, please share; but if not, I think the issue can be closed. Thanks again. On
I tried to do this on function
I tried to do this on function Obs1: I used a 3D data cube of sizes 201x201x2412 |
I took a quick look at your code, and I see several issues. First, Second, in Third, I see only a call to write the header in Finally, looking at |
Before investing more time in this workaround, we will be working on fixing this bug over the next few days. Once we have a fix, it will initially appear on the develop branch. The next official release is still a couple of months away. |
Dear all,
I am trying to generate a
.zfp
file with a header using CUDA. Using the zfp util on the command line, a serial test gives:test.zfp
has size50188912
and can be correctly decompressed using:But doing the same with the
cuda
flag, i.e.:Now
test.zfp
has size50188896
, andgives
incorrect or missing header
. When doing the decompression with all the parameters, it works perfectly. How could I put this header when doing the compression on the GPU?Thanks in advance,
Victor
The text was updated successfully, but these errors were encountered: