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

1.26.2 - stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256 test failure on x86_64 #51675

Closed
mnd opened this issue Jun 21, 2018 · 5 comments
Closed
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@mnd
Copy link
Contributor

mnd commented Jun 21, 2018

I trying to build rust 1.26.2 package using 1.25.0 rust for GuixSD distro and I got next error on test stage:

test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m128d (line 32) ... ok
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m128 (line 32) ... ok
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m128i (line 39) ... ok
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256 (line 32) ... FAILED
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256d (line 32) ... ok
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256i (line 36) ... ok
test ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m64 (line 39) ... ok

failures:

---- ../stdsimd/coresimd/x86/mod.rs - coresimd::x86::__m256 (line 32) stdout ----
        thread 'rustc' panicked at 'test executable failed:


', librustdoc/test.rs:341:17

I build rust with gcc v5.5.0 as c and c++ compiler, with glibc 2.27, and with external llvm-3.9.1.

My system:

$ uname -a
Linux libremnd 4.16.7-gnu #1 SMP 1 x86_64 GNU/Linux
$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
stepping        : 6
cpu MHz         : 2032.071
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm pti tpr_shadow vnmi flexpriority dtherm
bugs            : cpu_meltdown spectre_v1 spectre_v2
bogomips        : 4533.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
@kennytm
Copy link
Member

kennytm commented Jun 21, 2018

Your CPU doesn't support AVX.

The __m256 requires AVX, but the documentation is wrongly #[cfg]'ed on SSE:

https://github.com/rust-lang-nursery/stdsimd/blob/5d300a55cf521a035f40c1ef9869ed277c055312/coresimd/x86/mod.rs#L278-L286

It is likely just a copy-and-paste error. We just need to fix the doc test on the rust-lang-nursery/stdsimd repository and update the submodule here.

@kennytm kennytm added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. labels Jun 21, 2018
@gnzlbg
Copy link
Contributor

gnzlbg commented Jun 21, 2018

This has been fixed in stdsimd upstream, what remains is updating the stdsimd version in rust-lang/rust to use the latest stdsimd commit.

@kennytm typically alex does this but he won't be available for a couple of weeks, mind you walking me through the process once? I'm on IRC.

@kennytm
Copy link
Member

kennytm commented Jun 21, 2018

@gnzlbg Thanks! I think we'll do this as part of the update-to-Rust-1.29 PR.

@cuviper
Copy link
Member

cuviper commented Jun 21, 2018

with external llvm-3.9.1.

FYI, you need LLVM 6.0 for cfg(target_feature) to work, else it will always appear disabled.
(See #49428, and before that it only worked with the bundled LLVM.)

@mnd
Copy link
Contributor Author

mnd commented Jul 4, 2018

This issue was fixed in rust-lang/stdarch#481

@mnd mnd closed this as completed Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-SIMD Area: SIMD (Single Instruction Multiple Data) C-bug Category: This is a bug. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants