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] Implement Rdm and Dp #49737

Merged
merged 10 commits into from
Jun 24, 2021
Merged

[mono] Implement Rdm and Dp #49737

merged 10 commits into from
Jun 24, 2021

Conversation

imhameed
Copy link
Contributor

@imhameed imhameed commented Mar 17, 2021

See #42322 and
#42280.

Tested manually on an arm64 Linux VM running on an M1 Mac Mini. Does not
enable RDM or DP when AOT-compiling the associated runtime tests; our CI
hardware doesn't support these extensions yet.

@SamMonoRT
Copy link
Member

@imhameed - I assume you will be enabling related tests as part of the follow up PR ?

@imhameed
Copy link
Contributor Author

@imhameed - I assume you will be enabling related tests as part of the follow up PR ?

The related tests are enabled as part of this PR.

@imhameed
Copy link
Contributor Author

The AOT cross-compilation failures are related and I am looking into them now.

@imhameed
Copy link
Contributor Author

llvm::sys::getHostCPUFeatures doesn't probe for rdm or dotprod on arm64 Linux.

@imhameed
Copy link
Contributor Author

dotnet/llvm-project#103

@imhameed imhameed force-pushed the mono-arm64-rdm-dp branch 2 times, most recently from 4019e39 to 1a4731c Compare March 23, 2021 17:06
@imhameed
Copy link
Contributor Author

imhameed commented Mar 23, 2021

Well, I thought I had fixed this in dotnet/llvm-project#103 and I thought that this had been made accessible to this repo via e64237d, but the same problem (RDM and DP not detected by the runtime) is still occurring. I don't know what to do other than trial-and-error debugging against CI, which has a multiple-hour turnaround time.

@SamMonoRT
Copy link
Member

Well, I thought I had fixed this in dotnet/llvm-project#103 and I thought that this had been made accessible to this repo via e64237d, but the same problem (RDM and DP not detected by the runtime) is still occurring. I don't know what to do other than trial-and-error debugging against CI, which has a multiple-hour turnaround time.

@steveisok @akoeplinger any suggestions here ?

@imhameed
Copy link
Contributor Author

I suppose I could try running virtualized Linux on the M1 mini. There's also various Android devices (like the Vivo IQOO 5G and Samsung Galaxy S20 Ultra) that appear to support asimdrdm and asimddp although I have no idea how easy it is to run a normal Linux distribution on these.

@imhameed
Copy link
Contributor Author

imhameed commented Mar 26, 2021

I'll be away from my desk until April 5th. The current plan is to pick this up again when I return, and to attempt to do local debugging on an M1, where it is apparently possible to run a virtualized copy of Linux. When I have some downtime in the interim I'll also attempt doing some debugging against CI.

@imhameed
Copy link
Contributor Author

CoreCLR checks AT_HWCAP in the auxiliary vector in preference to parsing /proc/cpuinfo. The tokens that the CoreCLR cpuinfo parser scans for are not different from Mono's. I wonder what's going on.

@imhameed imhameed added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label May 6, 2021
@imhameed imhameed changed the title [mono] Implement Rdm and Dp DO-NOT-MERGE: [mono] Implement Rdm and Dp May 6, 2021
@imhameed
Copy link
Contributor Author

Spent some time setting up the M1 with an arm64 Linux VM. The tests all pass locally (with LLVM AOT + LLVM JIT and without) but they still crash on CI: https://gist.github.com/imhameed/dc1cf3ca935c1cd6d366bb1b721d0a76

@vargaz
Copy link
Contributor

vargaz commented Jun 22, 2021

Does the CI machine support these instructions ?

@imhameed
Copy link
Contributor Author

If I did #52345 correctly, then yeah, I think so.

@imhameed
Copy link
Contributor Author

If I did #52345 correctly, then yeah, I think so.

I evidently did not do this correctly. Neither RDM nor DP are reported as supported by AT_HWCAP or /proc/cpuinfo: https://gist.github.com/imhameed/3095248a51d5ab5324cd06d59e8fb09b

@imhameed imhameed changed the title DO-NOT-MERGE: [mono] Implement Rdm and Dp [mono] Implement Rdm and Dp Jun 24, 2021
@imhameed imhameed removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jun 24, 2021
@imhameed imhameed merged commit 4aeef0d into dotnet:main Jun 24, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 24, 2021
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.

None yet

4 participants