// ================================================================================================= // 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 // // This file uses the auto-tuner to tune the xdot OpenCL kernels. Note that the results are // not verified, since the result is not final and depends on the WGS2 parameter. // // ================================================================================================= #include "tuning/kernels/xdot.hpp" // Shortcuts to the clblast namespace using half = clblast::half; using float2 = clblast::float2; using double2 = clblast::double2; // Function to tune a specific variation V (not within the clblast namespace) template void StartVariation(int argc, char *argv[]) { const auto command_line_args = clblast::RetrieveCommandLineArguments(argc, argv); switch(clblast::GetPrecision(command_line_args)) { case clblast::Precision::kHalf: clblast::Tuner(argc, argv, V, clblast::XdotGetTunerDefaults, clblast::XdotGetTunerSettings, clblast::XdotTestValidArguments, clblast::XdotSetConstraints, clblast::XdotComputeLocalMemSize, clblast::XdotSetArguments); break; case clblast::Precision::kSingle: clblast::Tuner(argc, argv, V, clblast::XdotGetTunerDefaults, clblast::XdotGetTunerSettings, clblast::XdotTestValidArguments, clblast::XdotSetConstraints, clblast::XdotComputeLocalMemSize, clblast::XdotSetArguments); break; case clblast::Precision::kDouble: clblast::Tuner(argc, argv, V, clblast::XdotGetTunerDefaults, clblast::XdotGetTunerSettings, clblast::XdotTestValidArguments, clblast::XdotSetConstraints, clblast::XdotComputeLocalMemSize, clblast::XdotSetArguments); break; case clblast::Precision::kComplexSingle: clblast::Tuner(argc, argv, V, clblast::XdotGetTunerDefaults, clblast::XdotGetTunerSettings, clblast::XdotTestValidArguments, clblast::XdotSetConstraints, clblast::XdotComputeLocalMemSize, clblast::XdotSetArguments); break; case clblast::Precision::kComplexDouble: clblast::Tuner(argc, argv, V, clblast::XdotGetTunerDefaults, clblast::XdotGetTunerSettings, clblast::XdotTestValidArguments, clblast::XdotSetConstraints, clblast::XdotComputeLocalMemSize, clblast::XdotSetArguments); break; } } // Main function (not within the clblast namespace) int main(int argc, char *argv[]) { StartVariation<1>(argc, argv); StartVariation<2>(argc, argv); return 0; } // =================================================================================================