diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-31 16:11:35 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-31 16:11:35 +0100 |
commit | 1511909b6ffeb1cc1f3ee6b414c079e35a72a60d (patch) | |
tree | bfde2cd9188d239eb5ee790306c5caea8c2352b6 | |
parent | 7f893a85d97d81e8bfdd4d10f32502708824e5ea (diff) |
Revert "Added a simple test to check compilation of the invert kernels (issue with AMD APP)"
This reverts commit 0eb9b35481531d5ddc7e22371a44a12dc0e69c50.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/correctness/misc/compile_invert.cpp | 65 |
2 files changed, 1 insertions, 66 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 759f6d2e..53944b25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -578,7 +578,7 @@ if(TESTS) endforeach() # Miscellaneous tests - set(MISC_TESTS override_parameters compile_invert) + set(MISC_TESTS override_parameters) if(NOT CUDA) set(MISC_TESTS ${MISC_TESTS} preprocessor) endif() diff --git a/test/correctness/misc/compile_invert.cpp b/test/correctness/misc/compile_invert.cpp deleted file mode 100644 index 4ce458d1..00000000 --- a/test/correctness/misc/compile_invert.cpp +++ /dev/null @@ -1,65 +0,0 @@ - -// ================================================================================================= -// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This -// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max- -// width of 100 characters per line. -// -// Author(s): -// Cedric Nugteren <www.cedricnugteren.nl> -// -// This file contains a simple test to compile the invert kernel. -// -// ================================================================================================= - -#include <string> -#include <vector> -#include <cstdio> - -#include "utilities/utilities.hpp" -#include "routines/levelx/xinvert.hpp" - -namespace clblast { -// ================================================================================================= - -template <typename T> -size_t CompileInvertKernels(int argc, char *argv[], const bool silent) { - - // Retrieves the arguments - auto help = std::string{"Options given/available:\n"}; - auto arguments = RetrieveCommandLineArguments(argc, argv); - const auto platform_id = GetArgument(arguments, help, kArgPlatform, ConvertArgument(std::getenv("CLBLAST_PLATFORM"), size_t{0})); - const auto device_id = GetArgument(arguments, help, kArgDevice, ConvertArgument(std::getenv("CLBLAST_DEVICE"), size_t{0})); - - // Prints the help message (command-line arguments) - if (!silent) { fprintf(stdout, "\n* %s\n", help.c_str()); } - - // Initializes OpenCL - const auto platform = Platform(platform_id); - const auto device = Device(platform, device_id); - const auto context = Context(device); - auto queue = Queue(context, device); - - // Compiles the invert kernels - auto diagonal_invert_event = Event(); - auto inverter = Xinvert<T>(queue, diagonal_invert_event.pointer()); - - // Report and return - printf("\n"); - printf(" 1 test(s) passed\n"); - printf(" 0 test(s) failed\n"); - printf("\n"); - return 0; -} - -// ================================================================================================= -} // namespace clblast - -// Main function (not within the clblast namespace) -int main(int argc, char *argv[]) { - auto errors = size_t{0}; - errors += clblast::CompileInvertKernels<float>(argc, argv, false); - errors += clblast::CompileInvertKernels<clblast::float2>(argc, argv, true); - if (errors > 0) { return 1; } else { return 0; } -} - -// ================================================================================================= |