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

[wasm] EmccCompile: Add support for compiling sequentially #67483

Closed
wants to merge 6 commits into from

Conversation

radical
Copy link
Member

@radical radical commented Apr 2, 2022

Add support for user specified assemblies that should always be compiled
sequentially. This would be useful for cases where some assemblies fail to compile
because emcc runs out of memory when compiled in parallel with other assemblies.

New:

      - @(WasmAssemblyToAOTSequentially) - Filenames of assemblies to always compile (to .o) sequentially

This adds support for two cases:

1. Compiling an assembly in parallel fails due to getting oomkill'ed.
   In this case, it will get compiled again but not in parallel with
   anything else.

2. User specified assemblies that should always be compiled
   sequentially.

This would be useful for cases where some assemblies fail to compile
because `emcc` runs out of memory.

New:
```
      - $(WasmRetrySequentiallyIfNeeded)    - Retry assembly compilation to .o files sequentially, if needed.
                                              One such case could be if the compiler got killed due to OOM.
                                              Defaults to true.

      - @(WasmAssemblyToAOTSequentially) - Filenames of assemblies to always compile (to .o) sequentially
```
@radical radical added arch-wasm WebAssembly architecture area-Build-mono labels Apr 2, 2022
@ghost ghost assigned radical Apr 2, 2022
@ghost
Copy link

ghost commented Apr 2, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This adds support for two cases:

  1. Compiling an assembly in parallel fails due to getting oomkill'ed.
    In this case, it will get compiled again but not in parallel with
    anything else.

  2. User specified assemblies that should always be compiled
    sequentially.

This would be useful for cases where some assemblies fail to compile
because emcc runs out of memory.

New:

      - $(WasmRetrySequentiallyIfNeeded)    - Retry assembly compilation to .o files sequentially, if needed.
                                              One such case could be if the compiler got killed due to OOM.
                                              Defaults to true.

      - @(WasmAssemblyToAOTSequentially) - Filenames of assemblies to always compile (to .o) sequentially
Author: radical
Assignees: -
Labels:

arch-wasm, area-Build-mono

Milestone: -

@radical
Copy link
Member Author

radical commented Apr 2, 2022

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vargaz
Copy link
Contributor

vargaz commented Apr 3, 2022

Not sure that a build system should retry failing commands. Would a setting limiting the amount of parallelism, like make's -j argument work ?

@radical
Copy link
Member Author

radical commented Apr 4, 2022

Not sure that a build system should retry failing commands. Would a setting limiting the amount of parallelism, like make's -j argument work ?

Using only -j like argument would limit that for all the files, instead of a few, which is the problem that I was trying to solve here. Like when some assemblies run out of memory when aot'ed at the same time as others, but compile fine when aot'ed by themselves.

I have removed the retry mechanism here.

@radical
Copy link
Member Author

radical commented Apr 4, 2022

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@radical radical requested a review from vargaz April 4, 2022 22:02
@radical
Copy link
Member Author

radical commented Apr 5, 2022

/azp run runtime-wasm

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lewing
Copy link
Member

lewing commented Jun 27, 2022

@ankit do you still think this is useful?

@marek-safar marek-safar added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jul 19, 2022
@ghost ghost added the no-recent-activity label Aug 2, 2022
@ghost
Copy link

ghost commented Aug 2, 2022

This pull request has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Aug 8, 2022
@lewing lewing marked this pull request as draft November 29, 2022 19:11
@ghost ghost closed this Dec 29, 2022
@ghost
Copy link

ghost commented Dec 29, 2022

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 29, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants