SWDEV-425090 - remove some tests
Remove set of tests which checks for string "error" in clang's output. This is something HIP can not control and can lead to failures when we move around with C++ versions or clang decides to make some changes in its error logging. Change-Id: Iddbc3177d5a934bd4113e1475d0c759019270aed
Dieser Commit ist enthalten in:
committet von
Jatin Jaikishan Chaudhary
Ursprung
c1cc0e4ffe
Commit
4ccc9677c0
@@ -98,26 +98,6 @@ TEMPLATE_TEST_CASE("Unit_Device_Complex_Unary_Host_Sanity_Positive", "", hipFloa
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - RTCs kernels that pass argument of invalid type for unary complex functions.
|
||||
*
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/complex/complex.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_Device_Complex_Unary_Negative_Parameters_RTC") {
|
||||
ComplexTypeRTCWrapper<42>(kComplexConj);
|
||||
ComplexTypeRTCWrapper<28>(kComplexReal);
|
||||
ComplexTypeRTCWrapper<28>(kComplexImag);
|
||||
ComplexTypeRTCWrapper<28>(kComplexAbs);
|
||||
ComplexTypeRTCWrapper<29>(kComplexSqabs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
@@ -186,25 +166,6 @@ TEMPLATE_TEST_CASE("Unit_Device_Complex_Binary_Host_Sanity_Positive", "", hipFlo
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - RTCs kernels that pass argument of invalid type for binary complex functions.
|
||||
*
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/complex/complex.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_Device_Complex_Binary_Negative_Parameters_RTC") {
|
||||
ComplexTypeRTCWrapper<66>(kComplexAdd);
|
||||
ComplexTypeRTCWrapper<66>(kComplexSub);
|
||||
ComplexTypeRTCWrapper<66>(kComplexMul);
|
||||
ComplexTypeRTCWrapper<66>(kComplexDiv);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
@@ -263,22 +224,6 @@ TEMPLATE_TEST_CASE("Unit_Device_Complex_hipCfma_Host_Sanity_Positive", "", hipFl
|
||||
ComplexFunctionTernaryHostTest(ComplexFunction::kFma, input_val1, input_val2, input_val3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - RTCs kernels that pass argument of invalid type for hipCfma/hipCfmaf complex function.
|
||||
*
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/complex/complex.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_Device_Complex_hipCfma_Negative_Parameters_RTC") {
|
||||
ComplexTypeRTCWrapper<90>(kComplexFma);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
@@ -385,24 +330,6 @@ TEST_CASE("Unit_Device_make_hipComplex_Host_Positive") {
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - RTCs kernels that pass argument of invalid type for make complex functions.
|
||||
*
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/complex/complex.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_Device_make_Complex_Negative_Parameters_RTC") {
|
||||
ComplexTypeRTCWrapper<27>(kMakeHipComplex);
|
||||
ComplexTypeRTCWrapper<27>(kMakeHipFloatComplex);
|
||||
ComplexTypeRTCWrapper<27>(kMakeHipDoubleComplex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
@@ -461,23 +388,6 @@ TEMPLATE_TEST_CASE("Unit_Device_Complex_Cast_Host_Sanity_Positive", "", hipFloat
|
||||
REQUIRE(result.y == static_cast<decltype(CastType_t<TestType>().x)>(input_i));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - RTCs kernels that pass argument of invalid type for complex cast functions.
|
||||
*
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/complex/complex.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_Device_Complex_Cast_Negative_Parameters_RTC") {
|
||||
ComplexTypeRTCWrapper<21>(kComplexDoubleToFloat);
|
||||
ComplexTypeRTCWrapper<21>(kComplexFloatToDouble);
|
||||
}
|
||||
|
||||
/**
|
||||
* End doxygen group ComplexTest.
|
||||
* @}
|
||||
|
||||
@@ -72,41 +72,3 @@ template <typename T> void CompareValues(T actual_val, T ref_val, double margin)
|
||||
REQUIRE_THAT(actual_val, Catch::WithinAbs(ref_val, margin));
|
||||
}
|
||||
}
|
||||
|
||||
template <int expected_errors_num> void ComplexTypeRTCWrapper(const char* program_source) {
|
||||
hiprtcProgram program{};
|
||||
HIPRTC_CHECK(hiprtcCreateProgram(&program, program_source, "complex_type_kernels.cc", 0, nullptr,
|
||||
nullptr));
|
||||
|
||||
#if HT_AMD
|
||||
std::string args = std::string("-ferror-limit=100");
|
||||
const char* options[] = {args.c_str()};
|
||||
hiprtcResult result{hiprtcCompileProgram(program, 1, options)};
|
||||
#else
|
||||
// read from CMakeLists.txt file add_definitions
|
||||
std::string hip_path = HIP_PATH;
|
||||
// nvcc errors if headers with relative paths are included
|
||||
std::string opts_pre = "--pre-include="+ hip_path + "/include/hip/nvidia_detail/nvidia_hip_complex.h";
|
||||
std::string opts_pos = "--include-path=/usr/local/cuda/include";
|
||||
const char* options[] = {"-default-device" , opts_pre.c_str(), opts_pos.c_str()};
|
||||
hiprtcResult result{hiprtcCompileProgram(program, 3, options)};
|
||||
#endif
|
||||
|
||||
size_t log_size{};
|
||||
HIPRTC_CHECK(hiprtcGetProgramLogSize(program, &log_size));
|
||||
std::string log(log_size, ' ');
|
||||
HIPRTC_CHECK(hiprtcGetProgramLog(program, log.data()));
|
||||
int error_count{0};
|
||||
|
||||
std::string error_message{"error:"};
|
||||
|
||||
size_t npos_e = log.find(error_message, 0);
|
||||
while (npos_e != std::string::npos) {
|
||||
++error_count;
|
||||
npos_e = log.find(error_message, npos_e + 1);
|
||||
}
|
||||
|
||||
HIPRTC_CHECK(hiprtcDestroyProgram(&program));
|
||||
HIPRTC_CHECK_ERROR(result, HIPRTC_ERROR_COMPILATION);
|
||||
REQUIRE(error_count == expected_errors_num);
|
||||
}
|
||||
|
||||
@@ -292,68 +292,6 @@ TEMPLATE_TEST_CASE("Unit_VectorAndValueTypeOperations_SanityCheck_Basic_Device",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <int expected_errors_num> void VectorTypesRTCWrapper(const char* program_source) {
|
||||
hiprtcProgram program{};
|
||||
HIPRTC_CHECK(hiprtcCreateProgram(&program, program_source, "vector_types_kernels.cc", 0, nullptr,
|
||||
nullptr));
|
||||
|
||||
#if HT_AMD
|
||||
std::string args = std::string("-ferror-limit=100");
|
||||
const char* options[] = {args.c_str()};
|
||||
hiprtcResult result{hiprtcCompileProgram(program, 1, options)};
|
||||
#else
|
||||
hiprtcResult result{hiprtcCompileProgram(program, 0, nullptr)};
|
||||
#endif
|
||||
|
||||
size_t log_size{};
|
||||
HIPRTC_CHECK(hiprtcGetProgramLogSize(program, &log_size));
|
||||
std::string log(log_size, ' ');
|
||||
HIPRTC_CHECK(hiprtcGetProgramLog(program, log.data()));
|
||||
int error_count{0};
|
||||
|
||||
std::string error_message{"error:"};
|
||||
|
||||
size_t npos_e = log.find(error_message, 0);
|
||||
while (npos_e != std::string::npos) {
|
||||
++error_count;
|
||||
npos_e = log.find(error_message, npos_e + 1);
|
||||
}
|
||||
|
||||
HIPRTC_CHECK(hiprtcDestroyProgram(&program));
|
||||
HIPRTC_CHECK_ERROR(result, HIPRTC_ERROR_COMPILATION);
|
||||
REQUIRE(error_count == expected_errors_num);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Description
|
||||
* ------------------------
|
||||
* - Compiles kernels and host functions with negative scenarios:
|
||||
* -# Negate (-) operator on the unsigned vectors
|
||||
* -# Bitwise operators on the floating-point vectors
|
||||
* -# Calculate-assign operators that are not supported between vector and scalar
|
||||
* - Utilizes HIP RTC for compilation
|
||||
* Test source
|
||||
* ------------------------
|
||||
* - unit/vector_types/vector_types.cc
|
||||
* Test requirements
|
||||
* ------------------------
|
||||
* - HIP_VERSION >= 5.2
|
||||
*/
|
||||
TEST_CASE("Unit_VectorOperators_Negative_Parameters_RTC") {
|
||||
VectorTypesRTCWrapper<8>(kNegateUnsignedChar);
|
||||
VectorTypesRTCWrapper<8>(kNegateUnsignedShort);
|
||||
VectorTypesRTCWrapper<8>(kNegateUnsignedInt);
|
||||
VectorTypesRTCWrapper<8>(kNegateUnsignedLong);
|
||||
VectorTypesRTCWrapper<8>(kNegateUnsignedLongLong);
|
||||
VectorTypesRTCWrapper<96>(kBitwiseFloat);
|
||||
VectorTypesRTCWrapper<96>(kBitwiseDouble);
|
||||
VectorTypesRTCWrapper<96>(kCalculateAssignChar);
|
||||
VectorTypesRTCWrapper<96>(kCalculateAssignShort);
|
||||
VectorTypesRTCWrapper<96>(kCalculateAssignInt);
|
||||
VectorTypesRTCWrapper<96>(kCalculateAssignLong);
|
||||
VectorTypesRTCWrapper<96>(kCalculateAssignLongLong);
|
||||
}
|
||||
#endif // HT_AMD
|
||||
|
||||
/**
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren