Skip to content

Add mul_depth control and final RingGSW decryption error logging#126

Merged
SoraSuegami merged 2 commits into
mainfrom
codex/refactor-ring-mul-test
May 19, 2026
Merged

Add mul_depth control and final RingGSW decryption error logging#126
SoraSuegami merged 2 commits into
mainfrom
codex/refactor-ring-mul-test

Conversation

@SoraSuegami

Copy link
Copy Markdown
Member

Summary

  • Added LWE_NESTED_RNS_RING_GSW_MUL_BENCH_MUL_DEPTH with a default of 1.
  • Updated the RingGSW multiplication probe and benchmark circuit builders to repeat lhs * rhs * rhs * ... for the configured depth.
  • Logged the final product FHE decryption error with info and included mul_depth in the circuit config logging.

Testing

  • cargo +nightly fmt --all
  • FIDESLIB_SKIP_SUBMODULE_UPDATE=1 cargo test --features gpu --test test_gpu_lwe_nested_rns_ring_gsw_mul_bench --no-run
  • FIDESLIB_SKIP_SUBMODULE_UPDATE=1 cargo test --release --features gpu --test test_gpu_lwe_nested_rns_ring_gsw_mul_bench --no-run
  • Local release runs for mul_depth=1, 2, and 3 with min_crt_depth=max_crt_depth=53 completed far enough to capture the requested metrics before later GPU-memory failures in auxiliary sampling estimation.

@SoraSuegami SoraSuegami marked this pull request as ready for review May 19, 2026 04:36
@SoraSuegami SoraSuegami merged commit d820004 into main May 19, 2026
3 checks passed
@SoraSuegami SoraSuegami deleted the codex/refactor-ring-mul-test branch May 19, 2026 04:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e25d83c1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,5 @@
data_no,protocol,implementation,test_target,security_bits,input_count,input_size,injector_batch_bits,output_size,ring_dim_config,min_log_ring_dim,max_log_ring_dim,selected_log_ring_dim,selected_ring_dim,min_crt_depth,max_crt_depth,selected_crt_depth,crt_bits,base_bits,p_moduli_bits,max_unreduced_muls,scale,noise_refresh_cbd_n,error_sigma,trapdoor_sigma,d_secret,bench_iterations,search_only,lattice_estimator_check,lattice_reference_gauss_secpar,lattice_reference_cbd_secpar,lattice_reference_log_file,max_prf_mask_output_coeff_bits,achieved_secpar_for_gauss_in_run,achieved_secpar_for_cbd_in_run,prf_mask_output_coeff_bits,noise_refresh_v_bits,final_seed_bits,noisy_plaintext_error_bits,input_injection_error_bits,git_commit,git_worktree_dirty,simulation_log_file,benchmark_estimation_git_commit,benchmark_estimation_bench_iterations,benchmark_estimation_log_file,benchmark_estimation_obfuscate_latency,benchmark_estimation_obfuscate_total_time_nanos,benchmark_estimation_obfuscate_max_parallelism,benchmark_estimation_eval_latency,benchmark_estimation_eval_total_time_nanos,benchmark_estimation_eval_max_parallelism,benchmark_estimation_obfuscate_input_injection_latency_percent,benchmark_estimation_obfuscate_input_injection_total_time_percent,benchmark_estimation_eval_input_injection_latency_percent,benchmark_estimation_eval_input_injection_total_time_percent,benchmark_estimation_obfuscated_circuit_bytes,benchmark_estimation_input_injection_bytes
1,DiamondIO,tests/test_gpu_diamond_io.rs,test_gpu_diamond_io_error_search_and_bench_estimate,100,10,100,10,6,65536,15,17,16,65536,45,55,53,28,14,7,4,256,2,4.0,4.578,1,1,true,measured,120,120,/home/sora/.codex/worktrees/cedf/mxx/logs/test_gpu_diamond_io_input100_batch10_crt45_55_log15_17_sec100_sigma4p0_cbd2_release.log,1540,120,120,1474,756,149531758,1274,512,7bab63d0dcb8e75cd41cb9a140f49b19fb0a093f,true,/home/sora/.codex/worktrees/cedf/mxx/logs/test_gpu_diamond_io_input100_batch10_crt45_55_log15_17_sec100_sigma4p0_cbd2_release.log,d5ade121f9f09eafa4faa2f9cae1bb6e8dfbb7d8,5,/workspace/logs/diamond_io_sec100_h200_iter5_d5ade121_20260517T070013JST/mxx-h200-diamond-io-sec100-est-20260517_1gpu_d5ade121f9f0_20260517T070013JST_diamond_io_row1.log,6116.0162626537995,4147712288836272546518676036861137818135063392704860629750,24170928207324098131482568296628771565212991810,2081.6366215446014,350048464264823037952904676103997678563435289528,10760822874598810008199153238566502400,0.8956872261884774,1.0219173976262904e-57,2.6697915314711547,9.47236296456918e-55,7485461781551070670753632832559405143329441533839620640,718912573794748064

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use relative paths in committed CSV logs

The repository guideline in AGENTS.md says documented file paths must be relative to the repo root, but these committed rows record machine-specific absolute paths such as /home/sora/... and /workspace/logs/.... Since bench/check_diamond_io_csv_logs.py defaults to this CSV, a fresh checkout cannot use the committed data without reproducing the original author's filesystem layout or relying on filename-only fallbacks; store these log references relative to the repo (for example under logs/...) instead.

Useful? React with 👍 / 👎.

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.

1 participant