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

[mono][infra] Enable runtime tests in fullAOT LLVM mode on linux-x64 #92057

Merged
merged 110 commits into from
Apr 5, 2024

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Sep 14, 2023

Description

This PR enables jobs to run runtime tests in fullAOT LLVM mode on linux-x64. The jobs utilize the CBL-Mariner docker image, which contains the clang toolchain instead of binutils. Due to OOM and timeout issues, the tests are split into two jobs: intrinsics and other runtime tests.

Failing tests have been disabled and will be triaged in subsequent PRs. The arm64 support will be introduced in subsequent PRs. A list of disabled tests is included in #90427.

@kotlarmilos kotlarmilos added NO-REVIEW Experimental/testing PR, do NOT review it area-Infrastructure-mono labels Sep 14, 2023
@ghost ghost assigned kotlarmilos Sep 14, 2023
@kotlarmilos kotlarmilos added this to the 9.0.0 milestone Sep 14, 2023
@ghost
Copy link

ghost commented Sep 14, 2023

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

Work in progress.

This PR tests the linux-x64 fullAOT CI job.

Author: kotlarmilos
Assignees: -
Labels:

NO-REVIEW, area-Infrastructure-mono

Milestone: -

@kotlarmilos kotlarmilos added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Sep 14, 2023
@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

@kotlarmilos kotlarmilos changed the title [mono][infra] Enable linux-x64 Mono fullAOT llvm job on extra platforms [mono][infra] Enable runtime tests in fullAOT LLVM mode on linux-x64 Apr 3, 2024
@kotlarmilos kotlarmilos marked this pull request as ready for review April 3, 2024 18:17
@kotlarmilos kotlarmilos removed the blocked Issue/PR is blocked on something - see comments label Apr 3, 2024
Copy link
Member

@matouskozak matouskozak left a comment

Choose a reason for hiding this comment

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

LGTM! good job

testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMFullAot_RuntimeTests_Tests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it is needed in this PR but we should consolidate which flags are used for fullAOT/AOT jobs across our builds. For example, for perf jobs we use /p:MonoAOTEnableLLVM=true /p:MonoEnableLLVM=true /p:BuildMonoAOTCrossCompiler=true https://github.com/matouskozak/runtime/blob/12f546416d4aeb23b980a92e407fbf693823236d/eng/pipelines/coreclr/perf-non-wasm-jobs.yml#L39

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. This command only builds the runtime.

The AOT compiler is built in an optional step which contains required parameters:

- ${{ if and(eq(parameters.runtimeFlavor, 'mono'), in(parameters.runtimeVariant, 'llvmaot', 'llvmfullaot', 'minifullaot')) }}:
- ${{ if eq(parameters.archType, 'arm64') }}:
- ${{ if eq(parameters.runtimeVariant, 'minifullaot') }}:
- script: ./build.sh
-subset mono
-c ${{ parameters.buildConfig }}
-arch ${{ parameters.archType }}
/p:BuildMonoAotCrossCompiler=true
/p:BuildMonoAotCrossCompilerOnly=true
/p:CrossBuild=true
displayName: "Build Mono Mini AOT cross compiler"
- ${{ else }}:
- script: ./build.sh
-subset mono
-c ${{ parameters.buildConfig }}
-arch ${{ parameters.archType }}
/p:BuildMonoAotCrossCompiler=true
/p:BuildMonoAotCrossCompilerOnly=true
/p:MonoLibClang="/usr/local/lib/libclang.so.16"
/p:MonoAOTEnableLLVM=true
/p:CrossBuild=true
displayName: "Build Mono LLVM AOT cross compiler"

Copy link
Member

@matouskozak matouskozak Apr 4, 2024

Choose a reason for hiding this comment

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

Should we align on the use of MonoBundleLLVMOptimizer vs MonoAOTEnableLLVM then? Is the MonoBundleLLVMOptimizer=true necessary then? Looks like MonoEnableLLVM=true should be enough

<MonoBundleLLVMOptimizer Condition="'$(MonoEnableLLVM)' == 'true'">true</MonoBundleLLVMOptimizer>

testGroup: innerloop
nameSuffix: AllSubsets_Mono_LLVMFullAot_RuntimeIntrinsicsTests
runtimeVariant: llvmfullaot
buildArgs: -s mono+libs+clr.hosts+clr.iltools -c Release /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true
Copy link
Member

@matouskozak matouskozak Apr 4, 2024

Choose a reason for hiding this comment

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

Not sure if it is possible with Helix, but could we re-use the build from AllSubsets_Mono_LLVMFullAot_RuntimeTests_Tests job? The runtime build should be the same, the difference is only which tests get build...

Copy link
Member Author

@kotlarmilos kotlarmilos Apr 4, 2024

Choose a reason for hiding this comment

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

Correct, perhaps we can create a template. @fanyang-mono Should this be moved to runtime-llvm.yml?

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to the runtime-llvm.yml and fixed llvmaot job.

@kotlarmilos
Copy link
Member Author

kotlarmilos commented Apr 4, 2024

These jobs have been moved to runtime-llvm.yml. Test run: https://dev.azure.com/dnceng-public/public/_build/results?buildId=630560&view=results

@kotlarmilos
Copy link
Member Author

The failures shouldn't be related.

@kotlarmilos kotlarmilos merged commit ddae9bd into dotnet:main Apr 5, 2024
151 of 153 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants