Skip to content

Commit 000faa7

Browse files
committed
Enabled Previously disabled tests for SVE.
*Cast, ToFrom, MaskedCheck and Multiplication. Signed-off-by: maajidkhann <maajidkhan.n@fujitsu.com> Co-authored-by: Abhishek Kumar abhishek.r.kumar@fujitsu.com
1 parent 6403004 commit 000faa7

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

aten/src/ATen/test/vec_test_all_types.cpp

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -681,29 +681,12 @@ namespace {
681681
createDefaultBinaryTestCase<vec>(TestSeed()),
682682
RESOLVE_OVERLOAD(filter_sub_overflow));
683683
}
684-
/*The below two tests need to be compiled without SIMD with gcc compiler to avoid failures due to
685-
accuracy mismatch after 3rd decimal place for complex dtype.
686-
Arithmetics/2.Multiplication, where TypeParam = at::vec::SVE128::Vectorized<c10::complex<float>>
687-
Arithmetics/3.Multiplication, where TypeParam = at::vec::SVE128::Vectorized<c10::complex<double>>
688-
*/
689-
#if defined(__GNUC__) && defined(CPU_CAPABILITY_SVE128)
690-
#define SIMD_OPTIMIZED __attribute__((optimize("no-tree-vectorize")))
691-
#else
692-
#define SIMD_OPTIMIZED
693-
#endif
694-
695-
// Separate function to handle multiplication
696-
template<typename vec>
697-
SIMD_OPTIMIZED
698-
vec multiply(const vec& v0, const vec& v1) {
699-
return v0 * v1;
700-
}
701684
TYPED_TEST(Arithmetics, Multiplication) {
702685
using vec = TypeParam;
703686
test_binary<vec>(
704687
NAME_INFO(mult),
705688
RESOLVE_OVERLOAD(local_multiply),
706-
multiply<vec>,
689+
[](const vec& v0, const vec& v1) { return v0 * v1; },
707690
createDefaultBinaryTestCase<vec>(TestSeed(), false, true),
708691
RESOLVE_OVERLOAD(filter_mult_overflow));
709692
}
@@ -1843,7 +1826,6 @@ vec multiply(const vec& v0, const vec& v1) {
18431826
#undef TEST_MASK_LOAD
18441827
#undef TEST_MASK_LOAD_N
18451828
}
1846-
#if !defined(CPU_CAPABILITY_SVE)
18471829
TYPED_TEST(VecMaskTests, MaskedCheck) {
18481830
using VT = ValueType<TypeParam>;
18491831
using vec = TypeParam;
@@ -1867,8 +1849,6 @@ vec multiply(const vec& v0, const vec& v1) {
18671849

18681850
#undef TEST_MASK_CHECK_N
18691851
}
1870-
#endif
1871-
#if !defined(CPU_CAPABILITY_SVE)
18721852
TYPED_TEST(VecMaskTests, ToFrom) {
18731853
using vec = TypeParam;
18741854
using VT = ValueType<TypeParam>;
@@ -1894,8 +1874,6 @@ vec multiply(const vec& v0, const vec& v1) {
18941874
<< "Failure Details:\nTest Seed to reproduce: " << seed;
18951875
}
18961876
}
1897-
#endif
1898-
#if !defined(CPU_CAPABILITY_SVE)
18991877
TYPED_TEST(VecMaskTests, Cast) {
19001878
using vec = TypeParam;
19011879
using src_t = ValueType<TypeParam>;
@@ -1940,7 +1918,6 @@ vec multiply(const vec& v0, const vec& v1) {
19401918
#undef TEST_MASK_CAST
19411919
#undef TEST_MASK_CAST_N
19421920
}
1943-
#endif
19441921
#else
19451922
#error GTEST does not have TYPED_TEST
19461923
#endif

0 commit comments

Comments
 (0)