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

Make linux-riscv nativeaot port robust #112736

Open
wants to merge 51 commits into
base: main
Choose a base branch
from

Conversation

am11
Copy link
Member

@am11 am11 commented Feb 20, 2025

Huge thanks to @filipnavara, all smoke tests are passing (except DwarfDump which currently doesn't account for per-architecture stats).

Contributes to #106223. We will run AOT libs tests next.

am11 and others added 30 commits February 15, 2025 22:28
Co-authored-by: Filip Navara <[email protected]>
@filipnavara
Copy link
Member

filipnavara commented Feb 21, 2025

@am11 I pushed changes addressing all the feedback save for #112736 (comment). Tested on device.

@risc-vv
Copy link

risc-vv commented Feb 21, 2025

2fd845a is being scheduled for building and testing

GIT: 2fd845ad9515d7e1c5d4723580b2a97eba7388f0
REPO: dotnet/runtime
BRANCH: main

@risc-vv
Copy link

risc-vv commented Feb 21, 2025

RISC-V Release-CLR-VF2: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 10min 40s 100ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 21fc86a4b63aaf511fb5fbd6d7301655e597e3c8
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 627597 / 655412 (95.76%)
=======================
      passed: 627597
      failed: 328
     skipped: 1462
      killed: 27487
------------------------
  TOTAL libs: 258
 TOTAL tests: 656874
   REAL time: 2h 26min 46s 569ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 21fc86a4b63aaf511fb5fbd6d7301655e597e3c8
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 622743 / 658502 (94.57%)
=======================
      passed: 622743
      failed: 144
     skipped: 1406
      killed: 35615
------------------------
  TOTAL libs: 258
 TOTAL tests: 659908
   REAL time: 2h 40min 23s 602ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 21fc86a4b63aaf511fb5fbd6d7301655e597e3c8
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 45min 52s 616ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 21fc86a4b63aaf511fb5fbd6d7301655e597e3c8
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@am11
Copy link
Member Author

am11 commented Feb 21, 2025

Thank you! Tested after a clean build, haven't found any issue. 👍

@risc-vv
Copy link

risc-vv commented Feb 21, 2025

RISC-V Release-CLR-VF2: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 7min 50s 713ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 0acb29dc604205cde6d41e60efcc1b8170764933
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 45min 52s 458ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 0acb29dc604205cde6d41e60efcc1b8170764933
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 459134 / 495169 (92.72%)
=======================
      passed: 459134
      failed: 152
     skipped: 1456
      killed: 35883
------------------------
  TOTAL libs: 258
 TOTAL tests: 496625
   REAL time: 2h 54min 42s 914ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 0acb29dc604205cde6d41e60efcc1b8170764933
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 650948 / 679012 (95.87%)
=======================
      passed: 650948
      failed: 293
     skipped: 1398
      killed: 27771
------------------------
  TOTAL libs: 258
 TOTAL tests: 680410
   REAL time: 2h 26min 56s 577ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 0acb29dc604205cde6d41e60efcc1b8170764933
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@am11 am11 requested review from tomeksowi and jkotas February 24, 2025 11:04
@risc-vv
Copy link

risc-vv commented Feb 24, 2025

RISC-V Release-CLR-VF2: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 12min 57s 668ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 4b1889b52c5743258eb3db1188d699c90e3f1442
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 633426 / 666926 (94.98%)
=======================
      passed: 633426
      failed: 163
     skipped: 1477
      killed: 33337
------------------------
  TOTAL libs: 258
 TOTAL tests: 668403
   REAL time: 2h 43min 25s 256ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 4b1889b52c5743258eb3db1188d699c90e3f1442
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 45min 52s 727ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 4b1889b52c5743258eb3db1188d699c90e3f1442
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 668311 / 700335 (95.43%)
=======================
      passed: 668311
      failed: 327
     skipped: 1579
      killed: 31697
------------------------
  TOTAL libs: 258
 TOTAL tests: 701914
   REAL time: 2h 23min 37s 128ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 4b1889b52c5743258eb3db1188d699c90e3f1442
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@am11
Copy link
Member Author

am11 commented Feb 24, 2025

@jkotas as you probably already know this but testing these changes is non-trivial on community platforms compared to official ones. It would be nice if bootstrapping work isn't blocked on minor details so we can do fast iterations to stabilize things. CoreCLR runtime is still getting riscv64 fixes after two years or so, I doubt we can fit and finish AOT in one go especially with broken infra. For ref, it is now passing more tests than LA64.

@filipnavara
Copy link
Member

filipnavara commented Feb 24, 2025

It would be nice if bootstrapping work isn't blocked on minor details so we can do fast iterations to stabilize things.

I would not necessarily call it a minor detail. Debugging memory order semantic errors postmortem is close to impossible because the observed effects are gone by the time you get into debugger. I for one appreciate feedback on this and if other reviewers give it more scrutiny.

I understand that you want to get this PR in quickly and so do I. I'm willing to spend time on addressing it now that I have some details still fresh in memory... (I have the fences fixed locally, just need to run tests on HW.)

@jkotas
Copy link
Member

jkotas commented Feb 24, 2025

As I have said, my preference is to make the code just right where possible so that we do not have to go back to fix it again. If it is too hard (e.g. requires large scale refactoring), I would like to see wrong or sub-optimal code wrapped in TODOs and links to issues to ensure that these minor but important details do not fall through the cracks.

I am applying the same bar for both Microsoft and community contributions that go into main. For example, #112705 (comment)

@risc-vv
Copy link

risc-vv commented Feb 24, 2025

RISC-V Release-CLR-VF2: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 5min 18s 69ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: 78efdc7df09abf5b5371d7099c0725a82bdc6406
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 45min 52s 558ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: 78efdc7df09abf5b5371d7099c0725a82bdc6406
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 625826 / 663845 (94.27%)
=======================
      passed: 625826
      failed: 308
     skipped: 1453
      killed: 37711
------------------------
  TOTAL libs: 258
 TOTAL tests: 665298
   REAL time: 2h 22min 21s 251ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: 78efdc7df09abf5b5371d7099c0725a82bdc6406
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 623413 / 649277 (96.02%)
=======================
      passed: 623413
      failed: 148
     skipped: 1454
      killed: 25716
------------------------
  TOTAL libs: 258
 TOTAL tests: 650731
   REAL time: 2h 42min 7s 120ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: 78efdc7df09abf5b5371d7099c0725a82bdc6406
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

… and equivalent code in CoreCLR in ExchangeObject/CompareExchangeObject
@risc-vv
Copy link

risc-vv commented Feb 24, 2025

RISC-V Release-CLR-VF2: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 5min 48s 894ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

Build information and commands

GIT: d8486a6174f5ee81388319d64efb711fca7ba045
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-VF2: 422942 / 452006 (93.57%)
=======================
      passed: 422942
      failed: 158
     skipped: 1411
      killed: 28906
------------------------
  TOTAL libs: 258
 TOTAL tests: 453417
   REAL time: 2h 56min 10s 662ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and commands

GIT: d8486a6174f5ee81388319d64efb711fca7ba045
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-CLR-QEMU: 9461 / 9537 (99.20%)
=======================
      passed: 9461
      failed: 59
     skipped: 106
      killed: 17
------------------------
  TOTAL libs: 9643
 TOTAL tests: 9643
   REAL time: 2h 45min 34s 698ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

Build information and commands

GIT: d8486a6174f5ee81388319d64efb711fca7ba045
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

RISC-V Release-FX-QEMU: 627508 / 655359 (95.75%)
=======================
      passed: 627508
      failed: 311
     skipped: 1453
      killed: 27540
------------------------
  TOTAL libs: 258
 TOTAL tests: 656812
   REAL time: 2h 23min 3s 188ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and commands

GIT: d8486a6174f5ee81388319d64efb711fca7ba045
CI: a8426a46d8575dfcb3b5fec0d7d0b7a7c118d690
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

@am11
Copy link
Member Author

am11 commented Feb 24, 2025

Added comments seems self-explanatory. All outstanding feedback is addressed. Let me know if there is something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-riscv Related to the RISC-V architecture area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants