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

add on gpu compile flag support #176

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

Conversation

macro-ss
Copy link

support gpu build with --features gpu,cuda

gpu test case:
  cd prover;./s.sh 1;./p.sh 1

cpu test case:
  cd prover;./s.sh;./p.sh
@xander42280
Copy link
Contributor

use ./p.sh 1 thread 'main' panicked at library/core/src/panicking.rs:229:5:

thread 'main' panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustacuda-0.1.3/src/stream.rs:357:18:
Failed to destroy CUDA stream.: AssertError
stack backtrace:
0: 0x56207893fbd5 - <std::sys::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc3f31700732fbe36
1: 0x5620789671bb - core::fmt::write::h264759443e5452a8
2: 0x56207893c4af - std::io::Write::write_fmt::h19859b0cdace055d
3: 0x56207893f9ae - std::sys::backtrace::print::hcbfceb9c09962082
4: 0x562078940e09 - std::panicking::default_hook::{{closure}}::ha304a6ddd175ee6f
5: 0x562078940bac - std::panicking::default_hook::hae5ab9b28248136a
6: 0x562078941431 - std::panicking::rust_panic_with_hook::hbf6178baa52721f9
7: 0x562078941297 - std::panicking::begin_panic_handler::{{closure}}::hab58fc1731670d4c
8: 0x562078940099 - std::sys::backtrace::__rust_end_short_backtrace::h5237252f6772769b
9: 0x562078940f24 - rust_begin_unwind
10: 0x562078964c33 - core::panicking::panic_fmt::hea2003cd03a74d6c
11: 0x562078965106 - core::result::unwrap_failed::h66f542b8211e74b0
12: 0x562078907250 - <rustacuda::stream::Stream as core::ops::drop::Drop>::drop::h66df494550f47aec
13: 0x562078541aa0 - core::ptr::drop_in_place<plonky2::fri::oracle::CudaInvContext<plonky2_field::goldilocks_field::GoldilocksField,plonky2::plonk::config::PoseidonGoldilocksConfig,2_usize>>::h3eb891d7a5428ccd
14: 0x562078577d4b - zkmips::prove_single_seg_common::h9e5a7fe236506454
15: 0x562078580c64 - zkmips::main::hb496cc487e2e75ec
16: 0x562078344cd3 - std::sys::backtrace::__rust_begin_short_backtrace::ha09dd7aa7cab4ec2
17: 0x562078507ad9 - std::rt::lang_start::{{closure}}::ha94951fdb2aaeb99
18: 0x56207893325d - std::rt::lang_start_internal::h99fdbebdafe8d634
19: 0x562078581645 - main
20: 0x7f8635e08d90 -
21: 0x7f8635e08e40 - __libc_start_main
22: 0x562077f59de5 - _start
23: 0x0 -
thread 'main' panicked at library/core/src/panicking.rs:229:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.
./p.sh: line 10: 2114220 Aborted (core dumped) BASEDIR=../emulator/test-vectors RUST_LOG=info BLOCK_NO=13284491 SEG_FILE_DIR="/tmp/output" SEG_START_ID=0 SEG_NUM=1 SEG_SIZE=262144 cargo run $FEAT --release --example zkmips prove_segments

@xander42280
Copy link
Contributor

run https://github.com/zkMIPS/zkvm-benchmarks
when sha2-chain use GPU
[2024-11-09T12:09:15Z INFO zkm_prover::generation] Trace lengths (before padding): TraceCheckpoint { arithmetic_len: 203375, cpu_len: 1048576, poseidon_len: 3356, poseidon_sponge_len: 3356, logic_len: 229241, memory_len: 3241579 }
thread 'main' panicked at /home/ubuntu/gpu_zkm/plonky2-gpu/plonky2/src/fri/oracle.rs:233:110:
called Option::unwrap() on a None value
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

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.

2 participants