Enable dedup optimization in FullAOT mode only - #20381
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ivanpovazan
left a comment
There was a problem hiding this comment.
How do we test this fix?
Can we add a test which would verify E2E scenario?
Co-authored-by: Ivan Povazan <55002338+ivanpovazan@users.noreply.github.com>
I am not aware of any partial AOT test cases. I suggest to introduce a new test based on the customer issue. |
That sounds like a good idea. |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 2 tests failed, 170 tests passed. Failures❌ monotouch tests (MacCatalyst)Details
Html Report (VSDrops) Download ❌ xammac testsDetails
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
The fix dotnet/runtime#100025 has been merged and we should be able to add a functional test. |
I see, thanks. The current tip of net9.0 branch is built against dotnet/runtime@5e603d5 so if we choose to add a test for this will have to wait for the fix to flow in. |
Since this requires a dotnet/runtime fix, would it mean there's no point in backporting to .NET 8? Or will the dotnet/runtime fix be backported too? FWIW, if the fix is to be backported, then it should go into |
|
Actually, this PR doesn't rely on the fix. The initial problem involved deduplication during partial AOT compilation, where the runtime would search for wrappers and gsharedvts in the dedup assembly, but without collecting them during AOT compilation. The issue with the interpreter was identified after the dedup was disabled, but the reason was the same -- a wrapper wasn't found. To resolve this issue, we need to enable deduplication only in fullAOT mode. |
If you could put this change in |
|
Thanks, I will open a new PR with a corresponding functional test. |
Description
This PR enables dedup optimization in FullAOT mode only. If interpreter is used, the optimization can't collect all generics and emit them in a separate assembly, which could cause a program failure. This PR should be backported to
net8.0branch.Contributes to dotnet/runtime#99248