diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-23 18:12:13 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-09-23 18:12:13 +0200 |
commit | 0d8313708ca84f5338f405ae9b3261188e87b6f7 (patch) | |
tree | 4aa44264aa70730e1f702b438fc0891df503d35e /src/clblast.cpp | |
parent | 0dd2ca9283285f4144e4b5b7b809c31d1a70e856 (diff) | |
parent | 2df9f21ab8564cf7e55641400c0ab049df798f95 (diff) |
Merge branch 'device_name_slow_on_nvidia_gpu'
Diffstat (limited to 'src/clblast.cpp')
-rw-r--r-- | src/clblast.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/clblast.cpp b/src/clblast.cpp index d44649bb..3983e5fc 100644 --- a/src/clblast.cpp +++ b/src/clblast.cpp @@ -2492,11 +2492,12 @@ StatusCode OverrideParameters(const cl_device_id device, const std::string &kern // Retrieves the device name const auto device_cpp = Device(device); - const auto device_name = device_cpp.Name(); + const auto platform_id = device_cpp.Platform(); + const auto device_name = GetDeviceName(device_cpp); // Retrieves the current database values to verify whether the new ones are complete auto in_cache = false; - const auto current_database = DatabaseCache::Instance().Get(DatabaseKeyRef{ precision, device_name, kernel_name }, &in_cache); + const auto current_database = DatabaseCache::Instance().Get(DatabaseKeyRef{platform_id, device, precision, kernel_name}, &in_cache); if (!in_cache) { return StatusCode::kInvalidOverrideKernel; } for (const auto ¤t_param : current_database.GetParameterNames()) { if (parameters.find(current_param) == parameters.end()) { @@ -2530,8 +2531,8 @@ StatusCode OverrideParameters(const cl_device_id device, const std::string &kern const auto database = Database(device_cpp, kernel_name, precision, database_entries); // Removes the old database entry and stores the new one in the cache - DatabaseCache::Instance().Remove(DatabaseKey{ precision, device_name, kernel_name }); - DatabaseCache::Instance().Store(DatabaseKey{ precision, device_name, kernel_name }, Database(database)); + DatabaseCache::Instance().Remove(DatabaseKey{platform_id, device, precision, kernel_name}); + DatabaseCache::Instance().Store(DatabaseKey{platform_id, device, precision, kernel_name}, Database(database)); } catch (...) { return DispatchException(); } return StatusCode::kSuccess; |