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


[ROCm/hip-tests commit: 4ccc9677c0]
This commit is contained in:
Jatin Chaudhary
2025-01-27 11:26:21 +00:00
committed by Jatin Jaikishan Chaudhary
parent 09c23c5a1c
commit 9e607d2122
3 changed files with 0 additions and 190 deletions
@@ -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);
}