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

feat: enable compilation with CUDA stubs via the ZKSYNC_USE_CUDA_STUBS environment variable #29

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

robik75
Copy link
Member

@robik75 robik75 commented Sep 23, 2024

What ❔

This PR is a follow-up to

matter-labs/era-cuda#9
matter-labs/era-boojum-cuda#36

making it possible to enable the compilation with CUDA stubs by setting the environment variable ZKSYNC_USE_CUDA_STUBS to 1 or true or yes in any capitalization in addition to the no_cuda configuration flag.

Why ❔

Other way to enable the compilation with stubs besides a configuration flag is desirable.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Code has been formatted via cargo fmt and linted via cargo clippy.

@robik75 robik75 self-assigned this Sep 23, 2024
popzxc
popzxc previously approved these changes Sep 24, 2024
Copy link
Member

@popzxc popzxc left a comment

Choose a reason for hiding this comment

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

To make the changed discoverable, you can mention RUSTFLAGS and env var here, e.g. "Alternatively, if you don't have a compatible nvidia GPU, you can compile the project without GPU support. To do that, either set RUSTFLAGS to (...) or set the environment variable (...). Doing so will result in stubs being used instead of actual code that works with GPU. Note that you will be able to compile the code, but won't be able to run it.".

Copy link
Contributor

@EmilLuta EmilLuta left a comment

Choose a reason for hiding this comment

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

Unclear if we need two levers to enable stubs (both rustflags and env), but I don't see it as a big problem.

@EmilLuta EmilLuta merged commit f77ff80 into main Sep 24, 2024
13 checks passed
@EmilLuta EmilLuta deleted the rr/no-cuda-part-2 branch September 24, 2024 10:43
EmilLuta pushed a commit that referenced this pull request Sep 24, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.150.9](v0.150.8...v0.150.9)
(2024-09-24)


### Features

* enable compilation with CUDA stubs via the `ZKSYNC_USE_CUDA_STUBS`
environment variable
([#29](#29))
([f77ff80](f77ff80))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: zksync-era-bot <[email protected]>
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.

3 participants