diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-10 14:48:13 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-12-10 14:48:13 +0100 |
commit | c2f08fa346703286af75f969a71a2fd9829f61c1 (patch) | |
tree | 21a4c1cd518332c9e75c3a40fb8e1bbff2f35281 /src/tuning | |
parent | 9112e587aeefe5ec69bbc9e684ca69f2ac04df17 (diff) |
Fixed an issue in the tuners to prevent error -14 from persisting (CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)
Diffstat (limited to 'src/tuning')
-rw-r--r-- | src/tuning/tuning.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tuning/tuning.hpp b/src/tuning/tuning.hpp index 1d19a17c..ac6968dc 100644 --- a/src/tuning/tuning.hpp +++ b/src/tuning/tuning.hpp @@ -152,7 +152,6 @@ void Tuner(int argc, char* argv[]) { const auto platform = Platform(args.platform_id); const auto device = Device(platform, args.device_id); const auto context = Context(device); - auto queue = Queue(context, device); // Tests for validity of the precision and retrieves properties if (!PrecisionSupported<T>(device)) { @@ -214,6 +213,7 @@ void Tuner(int argc, char* argv[]) { // First runs a reference example to compare against try { + auto queue = Queue(context, device); printf("| ref | - |"); for (auto i = size_t{0}; i < settings.parameters.size() - 1; ++i) { printf(" "); } printf(" - |"); @@ -256,6 +256,7 @@ void Tuner(int argc, char* argv[]) { auto results = std::vector<TuningResult>(); for (auto config_id = size_t{0}; config_id < configurations.size(); ++config_id) { try { + auto queue = Queue(context, device); auto configuration = configurations[config_id]; printf("| %4zu | %5zu |", config_id + 1, configurations.size()); |