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

Test generic C implementations on a little-endian target on CI #1564

Open
Shnatsel opened this issue Nov 26, 2022 · 8 comments
Open

Test generic C implementations on a little-endian target on CI #1564

Shnatsel opened this issue Nov 26, 2022 · 8 comments

Comments

@Shnatsel
Copy link

Shnatsel commented Nov 26, 2022

Part of #1455

ring ships optimized assembly implementations for x86 and ARM. The generic C/Rust fallback implementations used on other architectures also need to be tested, and the test coverage needs to be measured. These targets can easily be run on Github Actions via user-mode QEMU; the blocker is of the lack profiler builtins support on most non-tier-1 architectures.

It has been recently enabled on s390x, and in fact enabling profiler builtins is really trivial - you just add a flag, test that it works, and open a PR: rust-lang/rust#104304

But s390x is big-endian; we also need a little-endian test target. The obvious choice for this is little-endian POWER8, or as Rust calls it powerpc64le-unknown-linux-gnu. But testing that profiler-builtins actually work requires either access to POWER hardware or a complex cross-compilation setup.

@Shnatsel
Copy link
Author

@erichte-ibm could you help with this? This should be trivial for anyone with access to POWER hardware, and it's a blocker for POWER support in ring.

I've been trying to rent a POWER VM through IBM cloud and do it myself, but the signup process rejected all my debit cards, and when I reached out to support about it they suspended my account without explanation.

@grubles
Copy link

grubles commented Dec 3, 2022

IntegriCloud offers POWER9 VMs: https://www.integricloud.com/

@Shnatsel
Copy link
Author

Shnatsel commented Dec 3, 2022

Sadly their pricing is starts at $325/month, and all I need is to run a one-off test on real hardware - the rest can be done in qemu. $325 is quite pricey for what's going to be just a day of usage.

@grubles
Copy link

grubles commented Dec 3, 2022

That's for dedicated hardware. I think the cloud offering is much cheaper.

@Shnatsel
Copy link
Author

Shnatsel commented Dec 3, 2022

Ah, indeed it is, and you can pay in smaller increments too. Nice, thanks!

@Shnatsel
Copy link
Author

Shnatsel commented Dec 6, 2022

A PR for profiler support on little-endian POWER is up, tested on integricloud: rust-lang/rust#105389

@SeanMollet
Copy link

SeanMollet commented Jun 5, 2023

I'm working on getting the profiler up on mipsel for my own purposes. Once I've got that done, this should be solvable.

I'm encountering a weird bug in building with profiling, Rust is pulling in something it shouldn't and I can't figure out where/how it's getting it. Once I've got that resolved, the rest of this should fall rather quickly.

rust-lang/rust#112313

@briansmith
Copy link
Owner

This is basically done. Code coverage is reported for the generic code for 64-bit big endian and 64-bit little endian. I don't know of a good 32-bit target in either big endian or little endian that is Tier 2 or higher AND that has profiler builtins. Thus coverage for 32-bit is getting reported pessimistically; i.e. the coverage is a lot better than the coverage reports would indicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants