-
Couldn't load subscription status.
- Fork 247
Configure f16 and f128 support for WebAssembly
#665
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
Conversation
b4fa4c3 to
6a80b90
Compare
f16 and f128 support for wasm32/wasm64f16 and f128 support for WebAssembly
|
I've updated the reproducer in the initial post. It seems that the CI is still failing for compiler-builtins/testcrate/src/bench.rs Lines 353 to 354 in 3ad4d9c
|
Just to see, I tested making linker errors fatal on all targets in #667.
Ah, these will be the only targets that are disabled in // testcrate/build.rs
mod builtins_build {
include!("../build.rs");
}
fn main() {
// ...
// will need to mark some things public in `/build.rs`
builtins_build::configure_f16_f128(builtins_build::Target::from_env());
}I would only do the |
|
Thanks! I just pushed commit 42ac64e. However, CI still fails for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I just pushed commit 42ac64e. However, CI still fails for the
wasm32-unknown-unknowntarget, curiously.
Unfortunately the files in benches/ also need to be updated, so anything that tests f16 should get gated behind f16_enabled - both the float_bench! and the criterion_group! invocations will need adjusting. The testcrate/src/bench.rs change is needed too.
Some of the benches already have different criterion_group! per cfg, e.g.
compiler-builtins/testcrate/benches/float_extend.rs
Lines 85 to 102 in 3ad4d9c
| #[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))] | |
| criterion_group!( | |
| float_extend, | |
| extend_f16_f32, | |
| extend_f16_f128, | |
| extend_f32_f64, | |
| extend_f32_f128, | |
| extend_f64_f128, | |
| ); | |
| // FIXME(#655): `f16` tests disabled until we can bootstrap symbols | |
| #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] | |
| criterion_group!( | |
| float_extend, | |
| extend_f32_f64, | |
| extend_f32_f128, | |
| extend_f64_f128, | |
| ); |
criterion_group and just configure manually, something like
pub fn float_extend() {
let mut criterion = Criterion::default().configure_from_args();
#[cfg(f16_enabled)]
{
...
}
extend_f32_f64(&mut criterion);
extend_f32_f64(&mut criterion);
}6fb223f to
1cafa03
Compare
1cafa03 to
35c5554
Compare
|
Thanks! You can submit a PR to update rust-lang/rust to 0.1.119 once #668 merges. |
|
Ah, publish failed because Line 17 in a4cd445
testcrate/build.rs just include the entire /build.rs as mentioned here #665 (comment)?
|
|
Apologies for the breakage. I'll submit a PR to add the new file to the Initially, I attempted to include the entire This is why I decided to move that logic into a separate file. |
|
No worries, thanks for the clarification. I'll take a look when it is up. |
|
I just opened PR #669 for this. |
|
0.1.119 published with that fix, feel free to submit a rust-lang/rust PR. |
See: #652 (comment)
Tested with:
Details