Skip to content

CS194-project/CS194-project

Repository files navigation

CS194 Fall 2015 Project
CUDA optimization of pigz


pigz folder contains pigz
zlib folder contains zlib

in zlib folder, "make USE_ORIGIN=1" to compile origin zlib
in zlib folder, "make" to compile cuda zlib
194culzss  contains a standalone compression CUDA  program.
--------------------------------------------------------------------------------------

Oct 31 2015

1. To compile and test the code,
   In the root folder
   "make" to build the code
   "make debug" (may need to make clean first) to build the code with debugging info
   "make test" to test the code
   "make clean" to delete the compiled outputs

2. To use cuda-gdb, make sure you have run "make clean && make debug"
   ./gdb.sh [compression level(optional)] [compressed file(optional)]

3. "make corpus" to download the corpus files

4. ./benchmark.sh to run a complete benchmark on compression level 9 on corpus files.

5. The corpus files are from Silesia.
   Besides the normal files, create a file "combined" which is the combination of all the other files.

6. Add perf_zlib.txt and perf_zopfli.txt which are the perf results of pigz with -9 and -11 respectively.

Example:
./gdb.sh
    This runs "pigz/pigz -k -9 corpus/dickens" in cuda-gdb. cuda-gdb immediately runs the program and stops at the beginning of main.

./gdb.sh 11
    This runs "pigz/pigz -k -11 corpus/dickens"

./gdb.sh 11 corpus/xml"
    This runs "pigz/pigz -k -11 corpus/xml"
   
Oct 24 2015

1. Now CUDA Toolchain is required to build zlib.
   Make sure CUDA is installed under /usr/local/cuda

2. You can add .cu files into zlib folder now.
   To let cuda functions runs in zlib, write cuda related code in .cu files only.
   Write a corresponding .h file and that the zlib source code includes that .h
   and then call the cuda function in zlib function.

3. Don't add extra .cu files to zlib folder because currently Makefile compiles
   all .cu files in that folder.

4. It is not required to rebuild pigz if zlib is rebuilt

TODO:
1. New added .h files are not detected by Makefile. Therefore, if you have
   made a changes in newly added .h files only, then make, you may encounter
   "Nothing to be done for all" error. You can do "make clean" then "make -j"
   to solve this problem. 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published