Skip to content

Pg/hpu bench fix #2355

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Pg/hpu bench fix #2355

wants to merge 2 commits into from

Conversation

pgardratzama
Copy link

Issue is appearing when running bench with iter > 1, for example:
cargo run --profile devo --features=integer,internal-keycache,hpu-v80 --example hpu_bench -- --iter 10 --integer-w 64
because of usage of .next_back() measured latency is only the latency of the 1st operation.

No emergency to merge.

@pgardratzama pgardratzama requested a review from Bapt-Roux May 19, 2025 15:51
@cla-bot cla-bot bot added the cla-signed label May 19, 2025
Comment on lines 263 to 270
let res_hpu = (0..args.iter)
.map(|_i| {
let res = HpuRadixCiphertext::exec(&proto, iop.opcode(), &srcs_enc, &imms);
std::hint::black_box(&res);
res
})
.next_back()
.last()
.expect("Iteration must be greater than 0");
Copy link
Member

Choose a reason for hiding this comment

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

better to loop or collect first, iterators being greedy, without comment here it's easy to re introduce the bug

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.

2 participants