Skip to content

Add AOCL-Compression 5.3.0 (AMD-optimized compression) - #321

Open
BiplabRaut wants to merge 1 commit into
inikep:masterfrom
amd:add_aocl-compression-5.3.0
Open

Add AOCL-Compression 5.3.0 (AMD-optimized compression)#321
BiplabRaut wants to merge 1 commit into
inikep:masterfrom
amd:add_aocl-compression-5.3.0

Conversation

@BiplabRaut

Copy link
Copy Markdown

AOCL-Compression provides AMD-optimized implementations of widely used lossless compression algorithms. This integration exposes them alongside lzbench's native implementations for direct comparison.

Registered variants

  • aocl-lz4 (level 0)
  • aocl-lz4hc (levels 1-12)
  • aocl-lzma (levels 0-9)
  • aocl-bzip2 (levels 1-9)
  • aocl-snappy (level 0)
  • aocl-zlib (levels 1-9)
  • aocl-zstd (levels 1-22)

The AOCL alias runs representative levels of all seven codecs.

Performance

Native and AOCL implementations were measured under identical settings:

  • Dataset: Silesia corpus as an uncompressed tar (211,957,760 bytes)
  • CPU: AMD Ryzen AI 9 HX PRO 370
  • Compiler: GCC 15.2.0
  • Execution: single core, pinned to CPU 0
  • Block size: lzbench default (whole input)
  • CPU boost: disabled
  • CPU governor: performance
  • Runs: five independent runs
  • Per-run settings: -t3,3 -i3,3 -p1
  • Reported throughput: geometric mean across five runs

Results summary

AOCL delivers substantial throughput gains on zlib (up to 3.7× compression, 2× decompression),
bzip2 (2.1–2.3× compression, +60–69% decompression), snappy (+20% compression, 2× decompression),
and moderate gains on zstd (+14–21% compression, +8–10% decompression), lz4hc (+18% compression),
lzma (+12% compression, +17% decompression), and lz4 (+5% compression, +2% decompression) with
minor compression ratio trade-offs.

Detailed Results

Compressor Compression Decompression Ratio
lz4 1.10.0 381.25 MB/s 2499.41 MB/s 47.59%
aocl-lz4 5.3.0 400.32 MB/s 2550.71 MB/s 48.00%
snappy 1.2.2 342.91 MB/s 719.19 MB/s 47.85%
aocl-snappy 5.3.0 413.03 MB/s 1433.58 MB/s 48.55%
zlib 1.3.2 -1 61.10 MB/s 199.93 MB/s 36.45%
aocl-zlib 5.3.0 -1 82.78 MB/s 414.80 MB/s 34.86%
zlib 1.3.2 -6 18.16 MB/s 210.76 MB/s 32.19%
aocl-zlib 5.3.0 -6 46.70 MB/s 446.00 MB/s 32.52%
zlib 1.3.2 -9 7.37 MB/s 212.55 MB/s 31.91%
aocl-zlib 5.3.0 -9 27.47 MB/s 439.38 MB/s 32.21%
bzip2 1.0.8 -1 9.55 MB/s 27.54 MB/s 28.54%
aocl-bzip2 5.3.0 -1 18.13 MB/s 46.47 MB/s 28.56%
bzip2 1.0.8 -5 9.36 MB/s 24.46 MB/s 26.29%
aocl-bzip2 5.3.0 -5 20.31 MB/s 39.21 MB/s 26.31%
bzip2 1.0.8 -9 8.92 MB/s 23.16 MB/s 25.75%
aocl-bzip2 5.3.0 -9 20.58 MB/s 37.65 MB/s 25.77%
zstd 1.5.7 -3 169.38 MB/s 871.35 MB/s 31.20%
aocl-zstd 5.3.0 -3 204.97 MB/s 959.04 MB/s 31.94%
zstd 1.5.7 -9 44.15 MB/s 920.85 MB/s 27.87%
aocl-zstd 5.3.0 -9 50.33 MB/s 994.89 MB/s 28.14%
lzma 26.01 -9 1.71 MB/s 52.42 MB/s 22.97%
aocl-lzma 5.3.0 -9 1.91 MB/s 61.51 MB/s 23.01%
lz4hc 1.10.0 -9 22.20 MB/s 2412.30 MB/s 36.75%
aocl-lz4hc 5.3.0 -9 26.19 MB/s 2436.0 MB/s 36.78%

Benchmark test was executed with the following command (5 iterations):

taskset -c 0 ./lzbench \
  -elz4/aocl-lz4/snappy/aocl-snappy/zlib,1/aocl-zlib,1/zlib,6/aocl-zlib,6/zlib,9/aocl-zlib,9/bzip2,1/aocl-bzip2,1/bzip2,5/aocl-bzip2,5/bzip2,9/aocl-bzip2,9/zstd,3/aocl-zstd,3/zstd,9/aocl-zstd,9/lzma,9/aocl-lzma,9/lz4hc,9/aocl-lz4hc,9 \
  -t3,3 -i3,3 -p1 -o4 silesia.tar

Requirements

  • Linux on x86-64
  • GNU Make
  • GNU nm and objcopy
  • AOCL-Compression sources initialized through the git submodule

Unsupported configurations automatically define BENCH_REMOVE_AOCL. The integration can be disabled explicitly with:

make DONT_BUILD_AOCL=1

Integration

  • Added AOCL-Compression as the lz/aocl-compression git submodule, pinned to upstream tag 5.3.
  • Added wrappers using AOCL's unified aocl_llc_* API.
  • Registered all seven AOCL codecs and their supported levels.
  • Added the AOCL alias for representative levels.
  • Builds AOCL as a static archive using its bundled GNU Make build.
  • Prefixes AOCL's internal symbols with AOCLLZB_ using objcopy to prevent collisions with lzbench's native codec implementations.
  • Preserves AOCL's public aocl_llc_* API symbols.
  • Updated README.md, BUILD.md, and CHANGELOG.

Expose its optimized compression as aocl-lz4, aocl-lz4hc,
aocl-lzma, aocl-bzip2, aocl-snappy, aocl-zlib and aocl-zstd.

Build integration:
- Linux x86_64 only
- The static archive is built from the bundled source with its own GNU Make
  AOCL internal symbols are prefixed (public aocl_llc_* API kept
  intact) so its bundled compressors cannot clash with lzbench's own
- Requires GNU binutils (nm, objcopy)
- AOCL-Compression sources initialized through the git submodule
- Force off with DONT_BUILD_AOCL=1

AOCL-Compression Upstream Repo: https://github.com/amd/aocl-compression
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

Successfully merging this pull request may close these issues.

2 participants