Skip to content

chore(gpu): noise checks on input#3483

Draft
andrei-stoian-zama wants to merge 7 commits into
mainfrom
as/check_noise_on_pbs_inputs
Draft

chore(gpu): noise checks on input#3483
andrei-stoian-zama wants to merge 7 commits into
mainfrom
as/check_noise_on_pbs_inputs

Conversation

@andrei-stoian-zama
Copy link
Copy Markdown
Contributor

@andrei-stoian-zama andrei-stoian-zama commented Apr 17, 2026

  • Enables check noise levels on PBS inputs

  • Removes bindings for low-level linear algebra which were not used. Most low-level functions are now internal use only:

    • cuda_add_lwe_ciphertext_vector_32
    • cuda_add_lwe_ciphertext_vector_64
    • cuda_add_lwe_ciphertext_vector_inplace_32
    • cuda_add_lwe_ciphertext_vector_plaintext_64
    • cuda_add_lwe_ciphertext_vector_plaintext_vector_32
    • cuda_add_lwe_ciphertext_vector_plaintext_vector_64
    • cuda_mult_lwe_ciphertext_vector_cleartext_vector_32
    • cuda_mult_lwe_ciphertext_vector_cleartext_vector_64
    • cuda_negate_lwe_ciphertext_vector_32
    • cuda_negate_lwe_ciphertext_vector_64
  • Moves functions from linear algebra that already take CudaRadixCiphertextFFI to integer.cuh

  • Converts some host_ functions to take CudaRadixCiphertextFFI :

    1. host_addition_plaintext
    2. host_addition_plaintext_scalar
    3. host_subtraction_plaintext
    4. host_cleartext_vec_multiplication
  • Adds noise&degree tracking to some functions that didn't have it: functions that were used in div_rem and comparisons

    1. host_subtraction
    2. host_cleartext_multiplication
    3. host_negation
    4. accumulate_all_blocks

@cla-bot cla-bot Bot added the cla-signed label Apr 17, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Backward-compat snapshot: suspicious changes detected

Suspicious changes were detected that may hide breaking changes. Please review the warnings below carefully.


⚠️ Warnings
  • high_level_api::backward_compatibility::keys::CompactPublicKeyVersions upgrade high_level_api::backward_compatibility::keys::CompactPublicKeyV0high_level_api::keys::public::CompactPublicKey:
    body hash changed
    old: a8018abd064232776f75ce7f295b9550f6cc5e0e1472b177b836fb72231ad96f
    new: 074ac5754505c1c8eb63f22f98a9a88c8448d31967720cecdff1828a1468fc50
  • high_level_api::backward_compatibility::keys::CompressedCompactPublicKeyVersions upgrade high_level_api::backward_compatibility::keys::CompressedCompactPublicKeyV0high_level_api::keys::public::CompressedCompactPublicKey:
    body hash changed
    old: a8018abd064232776f75ce7f295b9550f6cc5e0e1472b177b836fb72231ad96f
    new: 074ac5754505c1c8eb63f22f98a9a88c8448d31967720cecdff1828a1468fc50
  • high_level_api::backward_compatibility::keys::CompressedPublicKeyVersions upgrade high_level_api::backward_compatibility::keys::CompressedPublicKeyV0high_level_api::keys::public::CompressedPublicKey:
    body hash changed
    old: a8018abd064232776f75ce7f295b9550f6cc5e0e1472b177b836fb72231ad96f
    new: 074ac5754505c1c8eb63f22f98a9a88c8448d31967720cecdff1828a1468fc50
  • high_level_api::backward_compatibility::keys::IntegerClientKeyVersions upgrade high_level_api::backward_compatibility::keys::IntegerClientKeyV2high_level_api::backward_compatibility::keys::IntegerClientKeyV3:
    body hash changed
    old: 8e550ac1571aa298b0f557c4647d44f8ebf798713b9155c1ee9a78c6afd7a7a5
    new: f81f61619323d228bde8666d2cc47e16969c63510f703809455d05fcbdfdd7ee
  • high_level_api::backward_compatibility::keys::IntegerClientKeyVersions upgrade high_level_api::backward_compatibility::keys::IntegerClientKeyV6high_level_api::keys::inner::IntegerClientKey:
    body hash changed
    old: cab735acf8e6a19c6a55030e19a80195113c4fa685bc951387225cd8650aa658
    new: d6f6964315a737da75bf9628ace067cb88a27015a108710a2faf8cfa1c600e38
  • high_level_api::backward_compatibility::keys::PublicKeyVersions upgrade high_level_api::backward_compatibility::keys::PublicKeyV0high_level_api::keys::public::PublicKey:
    body hash changed
    old: a8018abd064232776f75ce7f295b9550f6cc5e0e1472b177b836fb72231ad96f
    new: 074ac5754505c1c8eb63f22f98a9a88c8448d31967720cecdff1828a1468fc50
➕ Neutral
  • high_level_api::backward_compatibility::keys::IntegerClientKeyVersions: new variant 8 (high_level_api::keys::inner::IntegerClientKey)
  • high_level_api::backward_compatibility::keys::IntegerClientKeyVersions: new upgrade high_level_api::backward_compatibility::keys::IntegerClientKeyV7high_level_api::keys::inner::IntegerClientKey
  • high_level_api::backward_compatibility::keys::IntegerCompressedServerKeyVersions: new variant 7 (high_level_api::keys::inner::IntegerCompressedServerKey)
  • high_level_api::backward_compatibility::keys::IntegerCompressedServerKeyVersions: new upgrade high_level_api::backward_compatibility::keys::IntegerCompressedServerKeyV6high_level_api::keys::inner::IntegerCompressedServerKey
  • high_level_api::backward_compatibility::keys::IntegerConfigVersions: new variant 1 (high_level_api::keys::inner::IntegerConfig)
  • high_level_api::backward_compatibility::keys::IntegerConfigVersions: new upgrade high_level_api::backward_compatibility::keys::IntegerConfigV0high_level_api::keys::inner::IntegerConfig
  • high_level_api::backward_compatibility::keys::IntegerServerKeyVersions: new variant 9 (high_level_api::keys::inner::IntegerServerKey)
  • high_level_api::backward_compatibility::keys::IntegerServerKeyVersions: new upgrade high_level_api::backward_compatibility::keys::IntegerServerKeyV8high_level_api::keys::inner::IntegerServerKey
  • New enum integer::backward_compatibility::oprf::CompressedOprfServerKeyVersions (1 variants)
  • New enum integer::backward_compatibility::oprf::GenericOprfServerKeyVersions (1 variants)
  • New enum integer::backward_compatibility::oprf::OprfPrivateKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::AtomicPatternOprfPrivateKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::CompressedOprfBootstrappingKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::CompressedOprfServerKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::GenericOprfServerKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::OprfBootstrappingKeyVersions (1 variants)
  • New enum shortint::backward_compatibility::oprf::OprfPrivateKeyVersions (1 variants)

If you encounter any errors or have doubts, you can verify locally by running:

make backward_correctness BASE_REF=<base_branch_or_commit>

Where BASE_REF is the reference branch or commit to check against.

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.

1 participant