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

feat(gpu): implement CUDA-based Radix Integer compression #1424

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

pdroalves
Copy link
Contributor

@pdroalves pdroalves commented Jul 25, 2024

Implements CudaCompressedCiphertextList, which can be used to compress many Cuda(Unsigned/Signed)RadixCiphertext.

closes: https://github.com/zama-ai/tfhe-rs-internal/issues/625

PR content/description

Check-list:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Relevant issues are marked as resolved/closed, related issues are linked in the description
  • Check for breaking changes (including serialization changes) and add them to commit message following the conventional commit specification

@cla-bot cla-bot bot added the cla-signed label Jul 25, 2024
@pdroalves pdroalves force-pushed the pa/feat/compression branch from a4b5851 to 207a76a Compare July 25, 2024 20:19
@pdroalves pdroalves changed the base branch from main to pa/refactor/sampleextraction July 25, 2024 20:19
@pdroalves pdroalves force-pushed the pa/feat/compression branch from 207a76a to 9c29d8d Compare July 25, 2024 20:22
@pdroalves pdroalves force-pushed the pa/refactor/sampleextraction branch 12 times, most recently from 249a7f0 to 40ee415 Compare July 29, 2024 13:58
@pdroalves pdroalves force-pushed the pa/feat/compression branch 4 times, most recently from cff04e5 to 7efa2c6 Compare August 1, 2024 20:50
@pdroalves pdroalves force-pushed the pa/refactor/sampleextraction branch from 40ee415 to a6fda27 Compare August 1, 2024 20:59
Base automatically changed from pa/refactor/sampleextraction to main August 2, 2024 09:10
@pdroalves pdroalves force-pushed the pa/feat/compression branch 3 times, most recently from 18533aa to c6b45c6 Compare August 6, 2024 13:53
@pdroalves pdroalves changed the title Pa/feat/compression feat(gpu): implement CUDA-based Radix Integer compression Aug 6, 2024
@pdroalves pdroalves force-pushed the pa/feat/compression branch 4 times, most recently from dbfbf48 to 9dbd262 Compare August 6, 2024 20:39
@pdroalves pdroalves force-pushed the pa/feat/compression branch from f40eaef to f7a5f4b Compare August 9, 2024 20:51
Copy link
Member

@IceTDrinker IceTDrinker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I could see, note that compression and CUDA in TFHE are not necessarily my areas of expertise in the code base

backends/tfhe-cuda-backend/src/cuda_bind.rs Outdated Show resolved Hide resolved
backends/tfhe-cuda-backend/src/cuda_bind.rs Show resolved Hide resolved
tfhe/benches/integer/bench.rs Show resolved Hide resolved
tfhe/benches/integer/bench.rs Outdated Show resolved Hide resolved
tfhe/benches/integer/bench.rs Outdated Show resolved Hide resolved
tfhe/src/integer/gpu/list_compression/server_keys.rs Outdated Show resolved Hide resolved
tfhe/src/integer/gpu/list_compression/server_keys.rs Outdated Show resolved Hide resolved
tfhe/src/integer/gpu/list_compression/server_keys.rs Outdated Show resolved Hide resolved
tfhe/src/integer/gpu/list_compression/server_keys.rs Outdated Show resolved Hide resolved
@pdroalves pdroalves force-pushed the pa/feat/compression branch 9 times, most recently from 0d690d0 to 3b19e61 Compare August 13, 2024 13:34
@pdroalves pdroalves requested a review from IceTDrinker August 14, 2024 12:15
@pdroalves pdroalves force-pushed the pa/feat/compression branch 5 times, most recently from 416bb9f to 08c4750 Compare August 14, 2024 16:19
@pdroalves pdroalves requested a review from tmontaigu August 14, 2024 17:03
tfhe/src/integer/gpu/list_compression/server_keys.rs Outdated Show resolved Hide resolved
Comment on lines +171 to +174
start_block_index: usize,
end_block_index: usize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 start_block_index: usize,
 end_block_index: usize,

could directly be block_range: RangeInclusive<usize>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How this line would look like?

let blocks = packed_list.block_info[start_block_index..=end_block_index].to_vec();

Copy link
Contributor

@tmontaigu tmontaigu Aug 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let blocks = packed_list.block_info[block_range].to_vec();

@pdroalves pdroalves force-pushed the pa/feat/compression branch from 08c4750 to de46746 Compare August 16, 2024 12:07
@pdroalves pdroalves merged commit fe5641e into main Aug 16, 2024
39 checks passed
@pdroalves pdroalves deleted the pa/feat/compression branch August 16, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants