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

How to speed up zeth compilation efficiency? #116

Open
RuiQi857 opened this issue Nov 6, 2024 · 3 comments
Open

How to speed up zeth compilation efficiency? #116

RuiQi857 opened this issue Nov 6, 2024 · 3 comments

Comments

@RuiQi857
Copy link

RuiQi857 commented Nov 6, 2024

We are running cargo build -F cuda --release on Ubuntu 22.04.4 LTS. This command takes too long, more than 30 minutes.
especially on the last few risc0 related packages.

Do you have any good suggestions to optimize the efficiency of the entire compilation?
Express my gratitude in advance~

Our environmental information is as follows:

Ubuntu 22.04.4 LTS

Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          46 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                GenuineIntel
  Model name:             Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
    CPU family:           6
    Model:                85
    Thread(s) per core:   2
    Core(s) per socket:   4
    Socket(s):            1
    Stepping:             4
    BogoMIPS:             5000.00


+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.90.07              Driver Version: 550.90.07      CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  Tesla T4                       On  |   00000000:00:07.0 Off |                    0 |
| N/A   29C    P8              9W /   70W |       1MiB /  15360MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
Copy link

linear bot commented Nov 6, 2024

@flaub
Copy link
Member

flaub commented Nov 6, 2024

The first time doing a compilation for CUDA is expected to take a long time. It varies based on the GPU architecture and even version of the GPU drivers. I install and use sccache which makes subsequent builds go much faster.

@RuiQi857
Copy link
Author

RuiQi857 commented Nov 6, 2024

Thank you for your guidance!
After using sccache, my compilation time was reduced to about 11mins.
image
But I want to further shorten the time, because after we develop locally, we need to push it to the remote server for debugging, and the long compilation time is unacceptable to us;
For example, we often only modify the code under guests folder. Under this condition, is there any way to speed up compilation?

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

No branches or pull requests

2 participants