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

PIL optimizer fails with Symbol not found #2051

Closed
georgwiese opened this issue Nov 6, 2024 · 2 comments
Closed

PIL optimizer fails with Symbol not found #2051

georgwiese opened this issue Nov 6, 2024 · 2 comments

Comments

@georgwiese
Copy link
Collaborator

georgwiese commented Nov 6, 2024

To reproduce: Get block_to_block_with_bus.pil and run:

$ cargo run pil output/block_to_block_with_bus.pil -o output -f         
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.18s
     Running `target/debug/powdr pil output/block_to_block_with_bus.pil -o output -f`
Analyzing PIL and computing constraints...
Writing output/block_to_block_with_bus_analyzed.pil.
done.
Optimizing pil...
thread 'main' panicked at /Users/georg/coding/powdr/pilopt/src/lib.rs:94:13:
Symbol not found: main_arith::sel[0]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I tried debugging this a little bit:

  • The problem appears to be this block, which adds a hint. Commenting this out makes the bug disappear.
  • collect_required_symbols appears to return main_arith::sel[0], which in my understanding is wrong. It should return main_arith::sel instead.
  • main_arith::sel[0] does not have a definition (only the array main_arith::sel)
@gzanitti
Copy link
Collaborator

Hey @georgwiese, according to your comment here #2056 (review), this seems to be solved. Shall we close the issue?

github-merge-queue bot pushed a commit that referenced this issue Jan 15, 2025
If rebased on top of #2051, this enables M31 RISC-V proofs with the bus
enabled:
```sh
cargo run -r --features plonky3 --bin powdr-rs compile riscv/tests/riscv_data/keccak-o output --field bb
cargo run -r --features plonky3 pil output/keccak.asm -o output -f --field m31 --prove-with plonky3 --linker-mode bus
```
@georgwiese
Copy link
Collaborator Author

Yeah, looks like it!

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 a pull request may close this issue.

2 participants