mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] simd: add AVX512 aggregated check
This added check could make AI test code generation's life easier. Change-Id: I725f567100159acd1ee537e8b1e6cb9c9e2bc690 Reviewed-on: https://go-review.googlesource.com/c/go/+/683016 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
0cdb2697d1
commit
dd63b7aa0e
2 changed files with 13 additions and 16 deletions
|
|
@ -38,8 +38,8 @@ func TestType(t *testing.T) {
|
|||
v.y = &y
|
||||
sink = y
|
||||
|
||||
if !simd.HasAVX512BW() || !simd.HasAVX512VL() {
|
||||
t.Skip("Test requires HasAVX512BW+VL, not available on this hardware")
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
v.z = maskT(simd.LoadInt32x4(&maskv).AsMask32x4())
|
||||
|
|
@ -113,8 +113,8 @@ func TestAdd(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestVectorConversion(t *testing.T) {
|
||||
if !simd.HasAVX512BW() || !simd.HasAVX512VL() {
|
||||
t.Skip("Test requires HasAVX512BW+VL, not available on this hardware")
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
xv := [4]int32{1, 2, 3, 4}
|
||||
|
|
@ -131,8 +131,8 @@ func TestVectorConversion(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMaskConversion(t *testing.T) {
|
||||
if !simd.HasAVX512BW() || !simd.HasAVX512VL() {
|
||||
t.Skip("Test requires HasAVX512BW+VL, not available on this hardware")
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
v := [4]int32{1, 0, 1, 0}
|
||||
|
|
@ -152,8 +152,8 @@ func TestMaskConversion(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestMaskedAdd(t *testing.T) {
|
||||
if !simd.HasAVX512BW() || !simd.HasAVX512VL() {
|
||||
t.Skip("Test requires HasAVX512BW+VL, not available on this hardware")
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
xv := [4]int32{1, 2, 3, 4}
|
||||
|
|
@ -180,8 +180,8 @@ func TestCompare(t *testing.T) {
|
|||
want := []int32{8, 0, 8, 0}
|
||||
x := simd.LoadInt32x4(&xv)
|
||||
y := simd.LoadInt32x4(&yv)
|
||||
if !simd.HasAVX512BW() {
|
||||
t.Skip("Test requires HasAVX512BW, not available on this hardware")
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
mask := x.Greater(y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue