oneapi-src / oneapi-src/oneAPI-samples
For DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress failed to decompress .gz file
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 1.2k
- Forks
- 745
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Summary
I build the decompressor for gzip, but it can only decompress the file offer in the repo. Most files I compressed using cpu version gzip is not able to be decompressed.
Version
I currently using oneAPI 2022.1 and the Code Sample v0.0.51 extension for VScode to pull the code.
Environment
Ubuntu 20.04
Steps to reproduce
Use linux built-in gzip to compress a file. The compression ratio should around 4, and the size of output file should over 50MB.
Then the executable we compile with this repo to decompress the file created by linux built-in version gzip.
Observed behavior
The decompression will stuck in a while loop and will never terminate. I print out some information to help me debug the issue, and found out the bug should locate in the huffman decoding kernel.
Here is some debug log I print:
Using GZIP decompression
Decompressing '../data/gzip/log-test.log.gz' 2 times
Input file size : 677.904KB
expected output size :2706127
Launching kernels for run 0
literals_per_cycle for producer is : 1
in_count = 677904
Iteration count = 677904
literals per cycle is : 4
literal per cycle from consumer = 4
huffman shifting = 1098876287
huffman shifting = 1098876287
huffman shifting = 1098876287
huffman shifting = 1098876287
huffman shifting = 1098876287
Expected behavior
I expected the decompressor can decompress all the file I compressed with CPU version gzip
I attached 3 files I used to debug.
log-test.log.gz
txt-test2.txt.gz
pdf-test.pdf.gz
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress und reproduziere den Hänger mit einer von Linux gzip erstellten Datei, wobei du die angehängten Eingaben verwendest, falls verfügbar. Untersuche den Huffman-Dekodierungskernel und seine Schleife um den gemeldeten Verschiebungswert. Als erledigt gilt die Aufgabe, wenn die erstellte ausführbare Datei beendet wird und Dateien, die vom Linux-gzip-Dienstprogramm erzeugt wurden, korrekt dekomprimiert, nicht nur das Repository-Beispiel.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp, linux, ubuntu
- Bereich
- data
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100