NVIDIA / nvcomp

Repository for nvCOMP docs and examples. nvCOMP is a library for fast lossless compression/decompression on the GPU that can be downloaded from https://developer.nvidia.com/nvcomp.
Other
558 stars 78 forks source link

[BUG](Cascade) The Lib does not check the data type of the input data #63

Open ser-mk opened 2 years ago

ser-mk commented 2 years ago

Describe the bug When decompressing the Cascaded Manager gets the data type from arguments which passed to its constructor. Seems It would be far more logical to compute the data type of the input stream because the Cascade compressor stores the data type in compressed stream.
https://github.com/NVIDIA/nvcomp/tree/a6e4e64a177e07cd2e5c8c5e07bb66ffefceae84/src/CascadedKernels.cuh#L1014

Steps/Code to reproduce bug For example I made a few modifications to the test_cascaded test: https://github.com/ser-mk/nvcomp/commit/3b90fb0321c6c13ba3678f75dcb610d6d388f916

This test fails because the data type was changed on NVCOMP_TYPE_LONGLONG. If you comment the line https://github.com/ser-mk/nvcomp/commit/3b90fb0321c6c13ba3678f75dcb610d6d388f916#diff-5beab312a7dc19a57e8e9f0d85eb7894b48699f09ff45128401113db280bd5caR112 That test will pass.

Environment details (please complete the following information):

Tesla T4 
Cuda compilation tools, release 11.1, V11.1.105
github-actions[bot] commented 2 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

ndickson-nvidia commented 2 years ago

Upon investigating this, (and sorry for taking so long to get around to it), there's the nvcomp::create_manager function, declared in include/nvcomp/nvcompManagerFactory.hpp for creating an nvcompManagerBase for decompressing a compressed buffer using the metadata in the buffer. If you know the data type that was used for compression, you could use the approach from test_cascaded.cpp, as above. The low-level interface cascaded decompression uses the data type from the compressed buffer, too, though in a different way. It doesn't currently provide a way to specify the data type that was used for compression at decompression time.

github-actions[bot] commented 1 year ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] commented 1 year ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.