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

CoreCLR RISC-V architecture port #84834

Open
5 of 7 tasks
gbalykov opened this issue Apr 14, 2023 · 19 comments
Open
5 of 7 tasks

CoreCLR RISC-V architecture port #84834

gbalykov opened this issue Apr 14, 2023 · 19 comments
Labels
arch-riscv Related to the RISC-V architecture area-Meta help wanted [up-for-grabs] Good issue for external contributors
Milestone

Comments

@gbalykov
Copy link
Member

gbalykov commented Apr 14, 2023

Current status

Our initial goal was to get to 100% pass rate for CodeGen BringUp tests in Debug mode. We've achieved this both on qemu and on StarFive VisionFive2 board.

For this, all changes are currenlty in PRs created by my colleagues @clamp03 @t-mustafin:

So, when all of the above are merged, CodeGen BringUp tests launched on main branch should pass both on VisionFive2 and qemu (for StarFive VisionFive2 board GC_REGIONS also need to be disabled currently, we are already investigating this).

Current test results for full JIT directory on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 4737
# Passed           : 4304
# Failed           : 413
# Skipped          : 20

Current test results for all tests on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 6565
# Passed           : 5663
# Failed           : 861
# Skipped          : 41

Further plans

Our further plans for near future:

  • focus on full JIT tests directory to make tests pass in Release/Debug/Checked mode and with/without DOTNET_GCgen0size=99999999
  • fix TODOs, which are not related to jit optimizations
  • add build CI in dotnet/runtime repo for RISC-V
  • add CI in dotnet/runtime repo for RISC-V with some tests run on qemu
  • enable JitDisasm and JitDump
  • fix or disable GC_REGIONS on VisionFive2
  • focus on more tests dirs with Release/Debug/Checked build of runtime after all of the above
  • focus on libraries (corefx) tests to make innerloop/outerloop tests pass
  • jitstress, jitstressregs, gcstress testing

What's currently not in our plans for near future:

  • full jit optimizations with all optimization passes (i.e. disabled MinOpt, tiered compilation, etc.)
  • optimizations of codegen itself
  • crossgen2 support
  • SIMD and intrinsics support
  • GC (not sure about this yet, need to check current status without DOTNET_GCgen0size=99999999 and with/without FEATURE_CONSERVATIVE_GC)
  • EH, stackwalking, and interop portions (also not sure, need to check current status)
  • stubs optimizations, GC optimizations, etc.

Process

In overall, we basically follow https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/porting-ryujit.md and https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/guide-for-porting.md. We categorize failing tests by error type. Soon we'll open separate issue on what's currently being worked on.

Related issues

#36748, #75749

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 14, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 14, 2023
@ghost
Copy link

ghost commented Apr 14, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

Current status

Our initial goal was to get to 100% pass rate for CodeGen BringUp tests in Debug mode. We've achieved this both on qemu and on StarFive VisionFive2 board.

For this, all changes are currenlty in PRs created by my colleagues @clamp03 @t-mustafin:

So, when all of the above are merged, CodeGen BringUp tests launched on main branch should pass both on VisionFive2 and qemu (for StarFive VisionFive2 board GC_REGIONS also need to be disabled currently, we are already investigating this).

Current test results for full JIT directory on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 4737
# Passed           : 4304
# Failed           : 413
# Skipped          : 20

Current test results for all tests on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 6565
# Passed           : 5663
# Failed           : 861
# Skipped          : 41

Further plans

Our further plans for near future:

  • focus on full JIT tests directory to make tests pass in Debug mode and with DOTNET_GCgen0size=99999999
  • fix TODOs, which are not related to jit optimizations
  • add CI in dotnet/runtime repo for RISC-V with some tests run on qemu
  • enable JitDisasm and JitDump
  • fix or disable GC_REGIONS on VisionFive2
  • focus on more tests dirs with Debug build of runtime after all of the above

What's currently not in our plans for near future:

  • full jit optimizations with all optimization passes (i.e. disabled MinOpt, tiered compilation, etc.)
  • optimizations of codegen itself
  • crossgen2 support
  • SIMD and intrinsics support
  • jitstress, jitstressregs, gcstress testing
  • GC (not sure about this yet, need to check current status without DOTNET_GCgen0size=99999999 and with/without FEATURE_CONSERVATIVE_GC)
  • EH, stackwalking, and interop portions (also not sure, need to check current status)
  • running libraries (corefx) tests
  • stubs optimizations, GC optimizations, etc.

Process

In overall, we basically follow https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/porting-ryujit.md and https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/guide-for-porting.md. We categorize failing tests by error type. Soon we'll open separate issue on what's currently being worked on.

Related issues

#36748, #75749

Author: gbalykov
Assignees: -
Labels:

area-CodeGen-coreclr, untriaged

Milestone: -

@gbalykov
Copy link
Member Author

@teo-tsirpanis teo-tsirpanis added area-Meta and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Apr 14, 2023
@ghost
Copy link

ghost commented Apr 14, 2023

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

Issue Details

Current status

Our initial goal was to get to 100% pass rate for CodeGen BringUp tests in Debug mode. We've achieved this both on qemu and on StarFive VisionFive2 board.

For this, all changes are currenlty in PRs created by my colleagues @clamp03 @t-mustafin:

So, when all of the above are merged, CodeGen BringUp tests launched on main branch should pass both on VisionFive2 and qemu (for StarFive VisionFive2 board GC_REGIONS also need to be disabled currently, we are already investigating this).

Current test results for full JIT directory on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 4737
# Passed           : 4304
# Failed           : 413
# Skipped          : 20

Current test results for all tests on VisionFive2 in Debug with DOTNET_GCgen0size=99999999:

# Tests Discovered : 6565
# Passed           : 5663
# Failed           : 861
# Skipped          : 41

Further plans

Our further plans for near future:

  • focus on full JIT tests directory to make tests pass in Debug mode and with DOTNET_GCgen0size=99999999
  • fix TODOs, which are not related to jit optimizations
  • add CI in dotnet/runtime repo for RISC-V with some tests run on qemu
  • enable JitDisasm and JitDump
  • fix or disable GC_REGIONS on VisionFive2
  • focus on more tests dirs with Debug build of runtime after all of the above

What's currently not in our plans for near future:

  • full jit optimizations with all optimization passes (i.e. disabled MinOpt, tiered compilation, etc.)
  • optimizations of codegen itself
  • crossgen2 support
  • SIMD and intrinsics support
  • jitstress, jitstressregs, gcstress testing
  • GC (not sure about this yet, need to check current status without DOTNET_GCgen0size=99999999 and with/without FEATURE_CONSERVATIVE_GC)
  • EH, stackwalking, and interop portions (also not sure, need to check current status)
  • running libraries (corefx) tests
  • stubs optimizations, GC optimizations, etc.

Process

In overall, we basically follow https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/porting-ryujit.md and https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/guide-for-porting.md. We categorize failing tests by error type. Soon we'll open separate issue on what's currently being worked on.

Related issues

#36748, #75749

Author: gbalykov
Assignees: -
Labels:

area-Meta, untriaged

Milestone: -

@JakeSays
Copy link

At first I was excited to see this RISCV work, but the list of 'not planned' stuff is significant.

@shushanhf
Copy link
Contributor

shushanhf commented Apr 21, 2023

@gbalykov @t-mustafin @clamp03
You should be careful before pushing PRs to avoid destroying the LoongArch64's code, liking #84584 #82381

@alpencolt
Copy link

JitDisasm and JitDump work on RISC-V. Could be excluded from list.

@JulieLeeMSFT
Copy link
Member

cc @mangod9

clamp03 added a commit to clamp03/runtime that referenced this issue Apr 24, 2023
- Fixed build error due to no return value in non-void function
  (ins_Move_Extend)
- dotnet#84834
@shushanhf
Copy link
Contributor

shushanhf commented Apr 24, 2023

@clamp03 @BruceForstall @jakobbotsch

As #82294, the RISCV64 is based on LoongArch64, the RISCV64 is so similarity with LoongArch64.

When I push LA64's PR, if also fix the RISCV64 with LoongArch64, while the LA64's patch I had tested on LA64's PC but I don't have the RISCV64 and can't test the RISCV64.

What do you mean?

@BruceForstall
Copy link
Member

@shushanhf I don't quite understand what you are asking.

I think you are saying: you can change LA64 and test LA64, but cannot build/test RISC-V. Is the question: how to do this? Or, what kind of testing is expected?

Currently, there is no building/testing of LA64 or RISC-V in the CI system. I don't expect that to change. Perhaps it would be a good idea to make it easy to build and possibly even do minimal testing ("smoke testing") of both platforms. I don't expect Microsoft will ever want to make that a pre-checkin requirement for changes to this repository -- the RISC-V and LA64 teams will still be responsible for actively monitoring for changes, and reacting to required changes in the VM and JIT. But if building/testing is easy, perhaps it will give better advanced notice to all teams of potential issues or work.

@jkotas
Copy link
Member

jkotas commented Apr 24, 2023

We are open to sponsor CI build-only legs for community supported targets to prevent trivial build breaks from getting in. Tizen and FreeBSD ports are on this plan today. If you are interested, create build environment with Linux x64 hosted cross-build environment in https://github.com/dotnet/dotnet-buildtools-prereqs-docker/ repo first.

clamp03 added a commit to clamp03/runtime that referenced this issue Apr 25, 2023
- Add RISC-V Checked Build CI
- dotnet#84834
jkotas pushed a commit that referenced this issue Apr 25, 2023
- Add RISC-V Checked Build CI
- #84834
@am11
Copy link
Member

am11 commented May 23, 2024

Noticed a TODO in exception dispatcher, could be this: am11@172991c (+ callsite adjustments).

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-Meta help wanted [up-for-grabs] Good issue for external contributors
Projects
None yet
Development

No branches or pull requests