Skip to content
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

Crashes #2

Closed
catid opened this issue Jul 3, 2024 · 3 comments
Closed

Crashes #2

catid opened this issue Jul 3, 2024 · 3 comments

Comments

@catid
Copy link

catid commented Jul 3, 2024

Examples crash using Nivida 4090 GPU on Linux:

#5  0x00007fff46d0e114 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#6  0x00007fff46d10754 in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#7  0x00007fff46ec04ce in ?? () from /lib/x86_64-linux-gnu/libcuda.so.1
#8  0x00007ffff6e44859 in ?? ()
   from /home/catid/mambaforge/envs/cfc/lib/python3.10/site-packages/torch/lib/../../nvidia/cuda_runtime/lib/libcudart.so.12
#9  0x00007ffff6e177a5 in ?? ()
   from /home/catid/mambaforge/envs/cfc/lib/python3.10/site-packages/torch/lib/../../nvidia/cuda_runtime/lib/libcudart.so.12
#10 0x00007ffff6e67091 in cudaMemcpy ()
   from /home/catid/mambaforge/envs/cfc/lib/python3.10/site-packages/torch/lib/../../nvidia/cuda_runtime/lib/libcudart.so.12
#11 0x00007fff42667e87 in SZp_compress_hostptr_f32 (oriData=oriData@entry=0x7ffefc600040, cmpBytes=0x7ffee9200040 "",
    nbEle=nbEle@entry=11689512, cmpSize=cmpSize@entry=0x7fffffffd270, errorBound=errorBound@entry=9.99999975e-05)
    at /home/catid/sources/cuda_float_compress/cuSZp/src/cuSZp_entry_f32.cu:18
#12 0x00007fff4265e9dc in cuszp_compress (input=..., errorBound=9.99999975e-05)
    at /home/catid/sources/cuda_float_compress/src/cuda_float_compress.cpp:36
--Type <RET> for more, q to quit, c to continue without paging--

Seems to be on this line: cudaMemcpy(d_oriData, oriData, sizeof(float)*pad_nbEle, cudaMemcpyHostToDevice);

@catid
Copy link
Author

catid commented Jul 3, 2024

Ah the bug is because it should be sizeof(float)*nbEle here. I guess no one is really using this compressor yet.

@hyfshishen
Copy link
Collaborator

hyfshishen commented Jul 4, 2024

Thanks for pointing out. This line seems to be in the host pointer function (input on CPU and output on CPU, just use GPU for compression), which is not as well maintained as device pointer functions (input on GPU and output on GPU). I guess you can temporarily try these two device-pointer functions:

  • SZp_compress_deviceptr_f32
  • SZp_decompress_deviceptr_f32

Then move data based on your requirements from GPU to CPU. Hope this can help to resolve this issue.

BTW, I am working on a major update to cuSZp, including the 2x~3x throughput and higher compression ratio (by a new lossless compression algorithm) [link]. The issue you mentioned will be updated by then. This will be done within July this year. Thanks again for your interest :)

@catid
Copy link
Author

catid commented Jul 10, 2024

Thanks for your work! I've released my own compression project here you may find interesting: https://github.com/catid/cuda_float_compress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants