diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-01-06 16:08:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-06 16:08:27 +0100 |
commit | a7ccce196915db7a3b7ea7fe8ea9048f5b1204c6 (patch) | |
tree | 27dd8771ee6f913b5a2dabfae115bbe7fbc9d979 /src/routine.cpp | |
parent | 8040a4e355bdf6531eb9c4c5ae1fe4f792899d24 (diff) | |
parent | ad197da08da7ef414db90dbb97e92c575363c280 (diff) |
Merge pull request #238 from CNugteren/gemm_api_with_temp_buffer
GEMM API with optional temp buffer
Diffstat (limited to 'src/routine.cpp')
-rw-r--r-- | src/routine.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/routine.cpp b/src/routine.cpp index 5a1c0fe9..fa5934f6 100644 --- a/src/routine.cpp +++ b/src/routine.cpp @@ -62,28 +62,10 @@ Routine::Routine(Queue &queue, EventPointer event, const std::string &name, device_(queue_.GetDevice()), db_(kernel_names) { - InitDatabase(userDatabase); + InitDatabase(device_, kernel_names, precision, userDatabase, db_); InitProgram(source); } -void Routine::InitDatabase(const std::vector<database::DatabaseEntry> &userDatabase) { - const auto platform_id = device_.PlatformID(); - for (const auto &kernel_name : kernel_names_) { - - // Queries the cache to see whether or not the kernel parameter database is already there - bool has_db; - db_(kernel_name) = DatabaseCache::Instance().Get(DatabaseKeyRef{ platform_id, device_(), precision_, kernel_name }, - &has_db); - if (has_db) { continue; } - - // Builds the parameter database for this device and routine set and stores it in the cache - log_debug("Searching database for kernel '" + kernel_name + "'"); - db_(kernel_name) = Database(device_, kernel_name, precision_, userDatabase); - DatabaseCache::Instance().Store(DatabaseKey{ platform_id, device_(), precision_, kernel_name }, - Database{ db_(kernel_name) }); - } -} - void Routine::InitProgram(std::initializer_list<const char *> source) { // Determines the identifier for this particular routine call |