Skip to content

[Yosys][Warnings] Fixed Make Being Called With Multiple Threads #2530

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

Merged

Conversation

AlexandreSinger
Copy link
Contributor

@AlexandreSinger AlexandreSinger commented Apr 11, 2024

CMake was calling another Make command, but was explicitly passing the number of threads to use. Make files should not pass the number of threads to use since it may cause more threads to be consumed than what the user intended.

For example, if the user used make -j10, the parent make would use 10 threads, and the child make would also use 10 threads (20 threads in total); but this is not what the user wanted. I think CMake recognized this and was suppressing this behaviour anyways. I believe that CMake will pass the number of threads for the child make to use anyways, but in a way that would prevent the above issue.

Removed the ability to set the number of threads for Yosys builds to handle the warning.

See issue #2518

CMake was calling another Make command, but was explicitly passing the
number of threads to use. Make files should not pass the number of
threads to use since it may cause more threads to be consumed than what
the user intended.

For example, if the user used `make -j10`, the parent make would use 10
threads, and the child make would also use 10 threads; but this is not
what the user wanted. I think CMake recognized this and was suppressing
this behaviour anyways. I believe that CMake will pass the number of
threads for the child make to use anyways, but in a way that would
prevent the above issue.

Removed the ability to set the number of threads for Yosys builds to
handle the warning.
@github-actions github-actions bot added build Build system lang-make CMake/Make code Parmys labels Apr 11, 2024
@AlexandreSinger
Copy link
Contributor Author

AlexandreSinger commented Apr 11, 2024

@vaughnbetz What do you think about this change? From researching the warning I found that it is bad practice to pass the "-j" argument to sub-makes (when your make file calls another make file) since this would double the number of threads used inadvertently; which is why the build was returning a warning. By removing the -j argument from the make call to the sub-make, the warning is resolved.

See:

@vaughnbetz
Copy link
Contributor

Seems reasonable to me. @alirezazd @navidjafarof : any concerns with this change?

@alirezazd
Copy link
Contributor

@vaughnbetz LGTM

@navidjafarof
Copy link
Contributor

@vaughnbetz No concerns.

@vaughnbetz vaughnbetz merged commit 33e3d31 into verilog-to-routing:master Apr 11, 2024
52 checks passed
@AlexandreSinger AlexandreSinger deleted the feature-make-warning branch May 28, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system lang-make CMake/Make code Parmys
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants