Skip to content

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

Closed
@mnd

Description

@mnd
Contributor

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:

Activity

kennytm

kennytm commented on Jun 21, 2018

@kennytm
Member

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.

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
A-SIMDArea: SIMD (Single Instruction Multiple Data)
C-bugCategory: This is a bug.
on Jun 21, 2018
gnzlbg

gnzlbg commented on Jun 21, 2018

@gnzlbg
Contributor

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

kennytm commented on Jun 21, 2018

@kennytm
Member

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

cuviper

cuviper commented on Jun 21, 2018

@cuviper
Member

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

mnd commented on Jul 4, 2018

@mnd
ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-SIMDArea: SIMD (Single Instruction Multiple Data)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cuviper@kennytm@gnzlbg@mnd

        Issue actions

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