Skip to content

added cpp test file for float compression#697

Open
Yuy1L1 wants to merge 2 commits intouccl-project:mainfrom
Yuy1L1:dietgpu_test
Open

added cpp test file for float compression#697
Yuy1L1 wants to merge 2 commits intouccl-project:mainfrom
Yuy1L1:dietgpu_test

Conversation

@Yuy1L1
Copy link
Copy Markdown

@Yuy1L1 Yuy1L1 commented Feb 1, 2026

Description

Please include a summary of the changes and the related issue.

Fixes # (issue)
Add C++ test for float compression

Type of Change

  • Bug fix
  • New feature
  • Documentation update

How Has This Been Tested?

Include any tests here.

  • Unit tests
  • Integration tests
  • Manual testing

Checklist

  • My code follows the style guidelines, e.g. format.sh.
  • [ x] I have run build_and_install.sh to verify compilation.
  • [ x] I have removed redundant variables and comments.
  • I have updated the documentation.
  • [ x] I have added tests.

@monopodium
Copy link
Copy Markdown
Collaborator

LD_LIBRARY_PATH=.:/usr/local/cuda/lib64:$LD_LIBRARY_PATH ./test_float_compress
Using GPU: NVIDIA RTX PRO 6000 Blackwell Server Edition MIG 1g.24gb (compute 12.0)

=== Testing with 524288 float16 elements (1024.00 KB) ===
Max compressed size: 1737264 bytes
Compressed size: 872544 bytes (ratio: 1.20x)
PASS: Decompressed data matches original exactly
=== Testing with 67108864 float16 elements (131072.00 KB) ===
Max compressed size: 151552560 bytes
Compressed size: 111635984 bytes (ratio: 1.20x)
PASS: Decompressed data matches original exactly
=== Testing with 1024 float16 elements (2.00 KB) ===
Max compressed size: 563760 bytes
Compressed size: 2336 bytes (ratio: 0.88x)
PASS: Decompressed data matches original exactly

ALL TESTS PASSED

@YangZhou1997
Copy link
Copy Markdown
Member

Perhaps I should tag @monopodium for reviewing. Feel free to merge if looking good to you

@monopodium
Copy link
Copy Markdown
Collaborator

Perhaps I should tag @monopodium for reviewing. Feel free to merge if looking good to you

Got it.

Yuy1L1 and others added 2 commits February 2, 2026 03:30
- Makefile.lib: builds libdietgpu.so standalone (no PyTorch dependency)
- test/Makefile: builds the C++ float compression test, links against libdietgpu.so
- Renamed build_standalone/ to test/ for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

3 participants