From 9f6711ee9048980ea217440682360d1c453e109c Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Tue, 3 Dec 2024 09:41:07 +0100 Subject: [PATCH 1/3] feat(prover): Add cuobjdump output after prover builds ref ZKD-2085 --- docker/circuit-prover-gpu/Dockerfile | 2 +- docker/proof-fri-gpu-compressor/Dockerfile | 2 +- docker/prover-gpu-fri/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/circuit-prover-gpu/Dockerfile b/docker/circuit-prover-gpu/Dockerfile index a5396e31ca88..597f631581e0 100644 --- a/docker/circuit-prover-gpu/Dockerfile +++ b/docker/circuit-prover-gpu/Dockerfile @@ -43,7 +43,7 @@ RUN curl -Lo sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz https://github.com/ WORKDIR /usr/src/zksync COPY . . -RUN cd prover && cargo build --release --bin zksync_circuit_prover +RUN cd prover && cargo build --release --bin zksync_circuit_prover && cuobjdump /usr/src/zksync/prover/target/release/zksync_circuit_prover FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 diff --git a/docker/proof-fri-gpu-compressor/Dockerfile b/docker/proof-fri-gpu-compressor/Dockerfile index e744787c8259..4fdf948985c8 100644 --- a/docker/proof-fri-gpu-compressor/Dockerfile +++ b/docker/proof-fri-gpu-compressor/Dockerfile @@ -48,7 +48,7 @@ RUN cd prover && \ cmake -Bbellman-cuda/build -Sbellman-cuda/ -DCMAKE_BUILD_TYPE=Release && \ cmake --build bellman-cuda/build/ -RUN cd prover && BELLMAN_CUDA_DIR=$PWD/bellman-cuda cargo build --features "gpu" --release --bin zksync_proof_fri_compressor +RUN cd prover && BELLMAN_CUDA_DIR=$PWD/bellman-cuda cargo build --features "gpu" --release --bin zksync_proof_fri_compressor && cuobjdump /usr/src/zksync/prover/target/release/zksync_proof_fri_compressor FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 diff --git a/docker/prover-gpu-fri/Dockerfile b/docker/prover-gpu-fri/Dockerfile index 2a680a49c5de..7053d69e2d1e 100644 --- a/docker/prover-gpu-fri/Dockerfile +++ b/docker/prover-gpu-fri/Dockerfile @@ -43,7 +43,7 @@ RUN curl -Lo sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz https://github.com/ WORKDIR /usr/src/zksync COPY . . -RUN cd prover && cargo build --release --features "gpu" --bin zksync_prover_fri +RUN cd prover && cargo build --release --features "gpu" --bin zksync_prover_fri && cuobjdump /usr/src/zksync/prover/target/release/zksync_prover_fri FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 From 315a08a21af33c3bc944e4faba70be7d5880bd17 Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Tue, 3 Dec 2024 09:59:23 +0100 Subject: [PATCH 2/3] Move cuobjdump into separate RUN --- docker/circuit-prover-gpu/Dockerfile | 4 +++- docker/proof-fri-gpu-compressor/Dockerfile | 4 +++- docker/prover-gpu-fri/Dockerfile | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/circuit-prover-gpu/Dockerfile b/docker/circuit-prover-gpu/Dockerfile index 597f631581e0..9edb0d1a30c7 100644 --- a/docker/circuit-prover-gpu/Dockerfile +++ b/docker/circuit-prover-gpu/Dockerfile @@ -43,7 +43,9 @@ RUN curl -Lo sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz https://github.com/ WORKDIR /usr/src/zksync COPY . . -RUN cd prover && cargo build --release --bin zksync_circuit_prover && cuobjdump /usr/src/zksync/prover/target/release/zksync_circuit_prover +RUN cd prover && cargo build --release --bin zksync_circuit_prover + +RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_circuit_prover FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 diff --git a/docker/proof-fri-gpu-compressor/Dockerfile b/docker/proof-fri-gpu-compressor/Dockerfile index 4fdf948985c8..afdc0e3dd7ff 100644 --- a/docker/proof-fri-gpu-compressor/Dockerfile +++ b/docker/proof-fri-gpu-compressor/Dockerfile @@ -48,7 +48,9 @@ RUN cd prover && \ cmake -Bbellman-cuda/build -Sbellman-cuda/ -DCMAKE_BUILD_TYPE=Release && \ cmake --build bellman-cuda/build/ -RUN cd prover && BELLMAN_CUDA_DIR=$PWD/bellman-cuda cargo build --features "gpu" --release --bin zksync_proof_fri_compressor && cuobjdump /usr/src/zksync/prover/target/release/zksync_proof_fri_compressor +RUN cd prover && BELLMAN_CUDA_DIR=$PWD/bellman-cuda cargo build --features "gpu" --release --bin zksync_proof_fri_compressor + +RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_proof_fri_compressor FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 diff --git a/docker/prover-gpu-fri/Dockerfile b/docker/prover-gpu-fri/Dockerfile index 7053d69e2d1e..ac9d554d7564 100644 --- a/docker/prover-gpu-fri/Dockerfile +++ b/docker/prover-gpu-fri/Dockerfile @@ -43,7 +43,9 @@ RUN curl -Lo sccache-v0.8.1-x86_64-unknown-linux-musl.tar.gz https://github.com/ WORKDIR /usr/src/zksync COPY . . -RUN cd prover && cargo build --release --features "gpu" --bin zksync_prover_fri && cuobjdump /usr/src/zksync/prover/target/release/zksync_prover_fri +RUN cd prover && cargo build --release --features "gpu" --bin zksync_prover_fri + +RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_prover_fri FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 From 5bc52ce9a3965645f7e715b0339a7d8088904078 Mon Sep 17 00:00:00 2001 From: Yury Akudovich Date: Tue, 3 Dec 2024 10:09:38 +0100 Subject: [PATCH 3/3] Add comment --- docker/circuit-prover-gpu/Dockerfile | 1 + docker/proof-fri-gpu-compressor/Dockerfile | 1 + docker/prover-gpu-fri/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/docker/circuit-prover-gpu/Dockerfile b/docker/circuit-prover-gpu/Dockerfile index 9edb0d1a30c7..852f42d705ec 100644 --- a/docker/circuit-prover-gpu/Dockerfile +++ b/docker/circuit-prover-gpu/Dockerfile @@ -45,6 +45,7 @@ COPY . . RUN cd prover && cargo build --release --bin zksync_circuit_prover +# Output build in CUDA architectures for debugging purposes. RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_circuit_prover FROM nvidia/cuda:12.4.0-runtime-ubuntu22.04 diff --git a/docker/proof-fri-gpu-compressor/Dockerfile b/docker/proof-fri-gpu-compressor/Dockerfile index afdc0e3dd7ff..6157bca0ac13 100644 --- a/docker/proof-fri-gpu-compressor/Dockerfile +++ b/docker/proof-fri-gpu-compressor/Dockerfile @@ -50,6 +50,7 @@ RUN cd prover && \ RUN cd prover && BELLMAN_CUDA_DIR=$PWD/bellman-cuda cargo build --features "gpu" --release --bin zksync_proof_fri_compressor +# Output build in CUDA architectures for debugging purposes. RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_proof_fri_compressor FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 diff --git a/docker/prover-gpu-fri/Dockerfile b/docker/prover-gpu-fri/Dockerfile index ac9d554d7564..db497fc5d500 100644 --- a/docker/prover-gpu-fri/Dockerfile +++ b/docker/prover-gpu-fri/Dockerfile @@ -45,6 +45,7 @@ COPY . . RUN cd prover && cargo build --release --features "gpu" --bin zksync_prover_fri +# Output build in CUDA architectures for debugging purposes. RUN cuobjdump /usr/src/zksync/prover/target/release/zksync_prover_fri FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04