summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-06-17 13:57:50 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-06-17 13:57:50 +0200
commit536b7fe4bce4b183cb060a1b9045752ae39d842f (patch)
tree1e1365317942c97f96764b774878868aae03faea
parent98a95c89fc0633efdc8439c942762bef9a1e5e1d (diff)
Removed the interface to the cache functions from the Routine class, calls them directly now
-rw-r--r--include/internal/cache.h4
-rw-r--r--include/internal/routine.h24
-rw-r--r--include/internal/routines/level1/xamax.h2
-rw-r--r--include/internal/routines/level1/xasum.h2
-rw-r--r--include/internal/routines/level1/xaxpy.h2
-rw-r--r--include/internal/routines/level1/xcopy.h3
-rw-r--r--include/internal/routines/level1/xdot.h2
-rw-r--r--include/internal/routines/level1/xnrm2.h2
-rw-r--r--include/internal/routines/level1/xscal.h3
-rw-r--r--include/internal/routines/level1/xswap.h3
-rw-r--r--include/internal/routines/level2/xgemv.h2
-rw-r--r--include/internal/routines/level2/xger.h2
-rw-r--r--include/internal/routines/level2/xher.h2
-rw-r--r--include/internal/routines/level2/xher2.h2
-rw-r--r--include/internal/routines/level2/xtbmv.h1
-rw-r--r--include/internal/routines/level2/xtpmv.h1
-rw-r--r--include/internal/routines/level2/xtrmv.h1
-rw-r--r--include/internal/routines/level3/xgemm.h4
-rw-r--r--include/internal/routines/level3/xhemm.h3
-rw-r--r--include/internal/routines/level3/xher2k.h2
-rw-r--r--include/internal/routines/level3/xherk.h2
-rw-r--r--include/internal/routines/level3/xsymm.h3
-rw-r--r--include/internal/routines/level3/xsyr2k.h2
-rw-r--r--include/internal/routines/level3/xsyrk.h2
-rw-r--r--include/internal/routines/level3/xtrmm.h3
-rw-r--r--include/internal/routines/levelx/xomatcopy.h2
-rw-r--r--src/cache.cc4
-rw-r--r--src/clblast.cc2
-rw-r--r--src/routine.cc12
-rw-r--r--src/routines/level1/xamax.cc2
-rw-r--r--src/routines/level1/xasum.cc2
-rw-r--r--src/routines/level1/xaxpy.cc2
-rw-r--r--src/routines/level1/xcopy.cc2
-rw-r--r--src/routines/level1/xdot.cc2
-rw-r--r--src/routines/level1/xnrm2.cc2
-rw-r--r--src/routines/level1/xscal.cc2
-rw-r--r--src/routines/level1/xswap.cc2
-rw-r--r--src/routines/level2/xgemv.cc2
-rw-r--r--src/routines/level2/xger.cc2
-rw-r--r--src/routines/level2/xher.cc2
-rw-r--r--src/routines/level2/xher2.cc2
-rw-r--r--src/routines/level3/xgemm.cc2
-rw-r--r--src/routines/level3/xhemm.cc2
-rw-r--r--src/routines/level3/xher2k.cc2
-rw-r--r--src/routines/level3/xherk.cc2
-rw-r--r--src/routines/level3/xsymm.cc2
-rw-r--r--src/routines/level3/xsyr2k.cc2
-rw-r--r--src/routines/level3/xsyrk.cc2
-rw-r--r--src/routines/level3/xtrmm.cc2
-rw-r--r--src/routines/levelx/xomatcopy.cc2
50 files changed, 61 insertions, 80 deletions
diff --git a/include/internal/cache.h b/include/internal/cache.h
index 4a11b70f..bc7e87d9 100644
--- a/include/internal/cache.h
+++ b/include/internal/cache.h
@@ -21,7 +21,6 @@
#include "internal/utilities.h"
namespace clblast {
-namespace cache {
// =================================================================================================
// The cache of compiled OpenCL binaries, along with some meta-data
@@ -90,10 +89,9 @@ bool ProgramIsInCache(const Context &context, const Precision &precision,
// =================================================================================================
// Clears the cache of stored binaries
-StatusCode ClearCache();
+StatusCode CacheClearAll();
// =================================================================================================
-} // namespace cache
} // namespace clblast
// CLBLAST_CACHE_H_
diff --git a/include/internal/routine.h b/include/internal/routine.h
index e1888f1f..c64abc4c 100644
--- a/include/internal/routine.h
+++ b/include/internal/routine.h
@@ -41,30 +41,6 @@ class Routine {
protected:
- // Stores a newly compiled binary/program into the cache
- void StoreBinaryToCache(const std::string& binary) const {
- cache::StoreBinaryToCache(binary, device_name_, precision_, routine_name_);
- }
- void StoreProgramToCache(const Program& program) const {
- cache::StoreProgramToCache(program, context_, precision_, routine_name_);
- }
-
- // Queries the cache and retrieve either a matching binary/program or a boolean whether a match
- // exists. The first assumes that the binary/program is available in the cache and will throw an
- // exception otherwise.
- std::string GetBinaryFromCache() const {
- return cache::GetBinaryFromCache(device_name_, precision_, routine_name_);
- }
- Program GetProgramFromCache() const {
- return cache::GetProgramFromCache(context_, precision_, routine_name_);
- }
- bool BinaryIsInCache() const {
- return cache::BinaryIsInCache(device_name_, precision_, routine_name_);
- }
- bool ProgramIsInCache() const {
- return cache::ProgramIsInCache(context_, precision_, routine_name_);
- }
-
// Non-static variable for the precision. Note that the same variable (but static) might exist in
// a derived class.
const Precision precision_;
diff --git a/include/internal/routines/level1/xamax.h b/include/internal/routines/level1/xamax.h
index 54434362..ec1de346 100644
--- a/include/internal/routines/level1/xamax.h
+++ b/include/internal/routines/level1/xamax.h
@@ -31,7 +31,7 @@ class Xamax: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xamax(Queue &queue, EventPointer event, const std::string &name = "AMAX");
diff --git a/include/internal/routines/level1/xasum.h b/include/internal/routines/level1/xasum.h
index ee593e30..b6c8e4e6 100644
--- a/include/internal/routines/level1/xasum.h
+++ b/include/internal/routines/level1/xasum.h
@@ -31,7 +31,7 @@ class Xasum: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xasum(Queue &queue, EventPointer event, const std::string &name = "ASUM");
diff --git a/include/internal/routines/level1/xaxpy.h b/include/internal/routines/level1/xaxpy.h
index 6ea3264b..71e7c01c 100644
--- a/include/internal/routines/level1/xaxpy.h
+++ b/include/internal/routines/level1/xaxpy.h
@@ -31,7 +31,7 @@ class Xaxpy: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xaxpy(Queue &queue, EventPointer event, const std::string &name = "AXPY");
diff --git a/include/internal/routines/level1/xcopy.h b/include/internal/routines/level1/xcopy.h
index b371ca9b..de9edaaf 100644
--- a/include/internal/routines/level1/xcopy.h
+++ b/include/internal/routines/level1/xcopy.h
@@ -30,7 +30,8 @@ class Xcopy: public Routine<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::event_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Constructor
Xcopy(Queue &queue, EventPointer event, const std::string &name = "COPY");
diff --git a/include/internal/routines/level1/xdot.h b/include/internal/routines/level1/xdot.h
index 7c69a902..b70ff3fe 100644
--- a/include/internal/routines/level1/xdot.h
+++ b/include/internal/routines/level1/xdot.h
@@ -31,7 +31,7 @@ class Xdot: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xdot(Queue &queue, EventPointer event, const std::string &name = "DOT");
diff --git a/include/internal/routines/level1/xnrm2.h b/include/internal/routines/level1/xnrm2.h
index f83cc2ce..1cb22728 100644
--- a/include/internal/routines/level1/xnrm2.h
+++ b/include/internal/routines/level1/xnrm2.h
@@ -31,7 +31,7 @@ class Xnrm2: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xnrm2(Queue &queue, EventPointer event, const std::string &name = "NRM2");
diff --git a/include/internal/routines/level1/xscal.h b/include/internal/routines/level1/xscal.h
index 40f017f2..c2b2c1bf 100644
--- a/include/internal/routines/level1/xscal.h
+++ b/include/internal/routines/level1/xscal.h
@@ -30,7 +30,8 @@ class Xscal: public Routine<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::event_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Constructor
Xscal(Queue &queue, EventPointer event, const std::string &name = "SCAL");
diff --git a/include/internal/routines/level1/xswap.h b/include/internal/routines/level1/xswap.h
index f794a1b4..45e34dd6 100644
--- a/include/internal/routines/level1/xswap.h
+++ b/include/internal/routines/level1/xswap.h
@@ -30,7 +30,8 @@ class Xswap: public Routine<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::event_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Constructor
Xswap(Queue &queue, EventPointer event, const std::string &name = "SWAP");
diff --git a/include/internal/routines/level2/xgemv.h b/include/internal/routines/level2/xgemv.h
index aec8b35b..b28536bd 100644
--- a/include/internal/routines/level2/xgemv.h
+++ b/include/internal/routines/level2/xgemv.h
@@ -31,7 +31,7 @@ class Xgemv: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xgemv(Queue &queue, EventPointer event, const std::string &name = "GEMV");
diff --git a/include/internal/routines/level2/xger.h b/include/internal/routines/level2/xger.h
index 260325cb..996e0fc8 100644
--- a/include/internal/routines/level2/xger.h
+++ b/include/internal/routines/level2/xger.h
@@ -31,7 +31,7 @@ class Xger: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xger(Queue &queue, EventPointer event, const std::string &name = "GER");
diff --git a/include/internal/routines/level2/xher.h b/include/internal/routines/level2/xher.h
index d66b2603..a4a25c3c 100644
--- a/include/internal/routines/level2/xher.h
+++ b/include/internal/routines/level2/xher.h
@@ -31,7 +31,7 @@ class Xher: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xher(Queue &queue, EventPointer event, const std::string &name = "HER");
diff --git a/include/internal/routines/level2/xher2.h b/include/internal/routines/level2/xher2.h
index 35bf8190..de8583f4 100644
--- a/include/internal/routines/level2/xher2.h
+++ b/include/internal/routines/level2/xher2.h
@@ -31,7 +31,7 @@ class Xher2: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xher2(Queue &queue, EventPointer event, const std::string &name = "HER2");
diff --git a/include/internal/routines/level2/xtbmv.h b/include/internal/routines/level2/xtbmv.h
index c9107c25..3ccdf3f8 100644
--- a/include/internal/routines/level2/xtbmv.h
+++ b/include/internal/routines/level2/xtbmv.h
@@ -30,6 +30,7 @@ class Xtbmv: public Xgemv<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Uses the generic matrix-vector routine
using Xgemv<T>::MatVec;
diff --git a/include/internal/routines/level2/xtpmv.h b/include/internal/routines/level2/xtpmv.h
index e85c225f..7619197d 100644
--- a/include/internal/routines/level2/xtpmv.h
+++ b/include/internal/routines/level2/xtpmv.h
@@ -30,6 +30,7 @@ class Xtpmv: public Xgemv<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Uses the generic matrix-vector routine
using Xgemv<T>::MatVec;
diff --git a/include/internal/routines/level2/xtrmv.h b/include/internal/routines/level2/xtrmv.h
index 97a180ff..4021b39c 100644
--- a/include/internal/routines/level2/xtrmv.h
+++ b/include/internal/routines/level2/xtrmv.h
@@ -30,6 +30,7 @@ class Xtrmv: public Xgemv<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
+ using Routine<T>::routine_name_;
// Uses the generic matrix-vector routine
using Xgemv<T>::MatVec;
diff --git a/include/internal/routines/level3/xgemm.h b/include/internal/routines/level3/xgemm.h
index 2fd853a9..211ae990 100644
--- a/include/internal/routines/level3/xgemm.h
+++ b/include/internal/routines/level3/xgemm.h
@@ -31,7 +31,7 @@ class Xgemm: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xgemm(Queue &queue, EventPointer event, const std::string &name = "GEMM");
@@ -45,7 +45,7 @@ class Xgemm: public Routine<T> {
const T beta,
const Buffer<T> &c_buffer, const size_t c_offset, const size_t c_ld);
- private:
+ protected:
// Static variable to get the precision
const static Precision precision_;
};
diff --git a/include/internal/routines/level3/xhemm.h b/include/internal/routines/level3/xhemm.h
index 8bd38393..a9a422b0 100644
--- a/include/internal/routines/level3/xhemm.h
+++ b/include/internal/routines/level3/xhemm.h
@@ -30,10 +30,11 @@ class Xhemm: public Xgemm<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
+ using Xgemm<T>::precision_;
// Constructor
Xhemm(Queue &queue, EventPointer event, const std::string &name = "HEMM");
diff --git a/include/internal/routines/level3/xher2k.h b/include/internal/routines/level3/xher2k.h
index 1afe87a6..092d7246 100644
--- a/include/internal/routines/level3/xher2k.h
+++ b/include/internal/routines/level3/xher2k.h
@@ -33,7 +33,7 @@ class Xher2k: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xher2k(Queue &queue, EventPointer event, const std::string &name = "HER2K");
diff --git a/include/internal/routines/level3/xherk.h b/include/internal/routines/level3/xherk.h
index 64abae3b..b5e2d723 100644
--- a/include/internal/routines/level3/xherk.h
+++ b/include/internal/routines/level3/xherk.h
@@ -33,7 +33,7 @@ class Xherk: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xherk(Queue &queue, EventPointer event, const std::string &name = "HERK");
diff --git a/include/internal/routines/level3/xsymm.h b/include/internal/routines/level3/xsymm.h
index c35dfb5e..991284f5 100644
--- a/include/internal/routines/level3/xsymm.h
+++ b/include/internal/routines/level3/xsymm.h
@@ -32,10 +32,11 @@ class Xsymm: public Xgemm<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
+ using Xgemm<T>::precision_;
// Constructor
Xsymm(Queue &queue, EventPointer event, const std::string &name = "SYMM");
diff --git a/include/internal/routines/level3/xsyr2k.h b/include/internal/routines/level3/xsyr2k.h
index 73d11b0b..c7ae1678 100644
--- a/include/internal/routines/level3/xsyr2k.h
+++ b/include/internal/routines/level3/xsyr2k.h
@@ -33,7 +33,7 @@ class Xsyr2k: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xsyr2k(Queue &queue, EventPointer event, const std::string &name = "SYR2K");
diff --git a/include/internal/routines/level3/xsyrk.h b/include/internal/routines/level3/xsyrk.h
index 344c02e2..860f8e10 100644
--- a/include/internal/routines/level3/xsyrk.h
+++ b/include/internal/routines/level3/xsyrk.h
@@ -35,7 +35,7 @@ class Xsyrk: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xsyrk(Queue &queue, EventPointer event, const std::string &name = "SYRK");
diff --git a/include/internal/routines/level3/xtrmm.h b/include/internal/routines/level3/xtrmm.h
index 5c12815d..caf1ca75 100644
--- a/include/internal/routines/level3/xtrmm.h
+++ b/include/internal/routines/level3/xtrmm.h
@@ -31,10 +31,11 @@ class Xtrmm: public Xgemm<T> {
using Routine<T>::queue_;
using Routine<T>::device_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Uses the regular Xgemm routine
using Xgemm<T>::DoGemm;
+ using Xgemm<T>::precision_;
// Constructor
Xtrmm(Queue &queue, EventPointer event, const std::string &name = "TRMM");
diff --git a/include/internal/routines/levelx/xomatcopy.h b/include/internal/routines/levelx/xomatcopy.h
index 7c284635..29f33aac 100644
--- a/include/internal/routines/levelx/xomatcopy.h
+++ b/include/internal/routines/levelx/xomatcopy.h
@@ -31,7 +31,7 @@ class Xomatcopy: public Routine<T> {
using Routine<T>::device_;
using Routine<T>::event_;
using Routine<T>::context_;
- using Routine<T>::GetProgramFromCache;
+ using Routine<T>::routine_name_;
// Constructor
Xomatcopy(Queue &queue, EventPointer event, const std::string &name = "OMATCOPY");
diff --git a/src/cache.cc b/src/cache.cc
index 4dbdb711..a34d351f 100644
--- a/src/cache.cc
+++ b/src/cache.cc
@@ -18,7 +18,6 @@
#include "internal/cache.h"
namespace clblast {
-namespace cache {
// =================================================================================================
// Stores the compiled binary or IR in the cache
@@ -98,7 +97,7 @@ bool ProgramIsInCache(const Context &context, const Precision &precision,
// =================================================================================================
// Clears the cache of stored binaries and programs
-StatusCode ClearCache() {
+StatusCode CacheClearAll() {
binary_cache_mutex_.lock();
binary_cache_.clear();
binary_cache_mutex_.unlock();
@@ -109,5 +108,4 @@ StatusCode ClearCache() {
}
// =================================================================================================
-} // namespace cache
} // namespace clblast
diff --git a/src/clblast.cc b/src/clblast.cc
index e3df6ede..2d6776d0 100644
--- a/src/clblast.cc
+++ b/src/clblast.cc
@@ -2120,7 +2120,7 @@ template StatusCode PUBLIC_API Omatcopy<half>(const Layout, const Transpose,
// =================================================================================================
// Clears the cache of stored binaries
-StatusCode ClearCache() { return cache::ClearCache(); }
+StatusCode ClearCache() { return CacheClearAll(); }
// Fills the cache with all binaries for a specific device
StatusCode FillCache(const cl_device_id device) {
diff --git a/src/routine.cc b/src/routine.cc
index c59cbc11..1086aead 100644
--- a/src/routine.cc
+++ b/src/routine.cc
@@ -40,17 +40,17 @@ template <typename T>
StatusCode Routine<T>::SetUp() {
// Queries the cache to see whether or not the program (context-specific) is already there
- if (ProgramIsInCache()) { return StatusCode::kSuccess; }
+ if (ProgramIsInCache(context_, precision_, routine_name_)) { return StatusCode::kSuccess; }
// Queries the cache to see whether or not the binary (device-specific) is already there. If it
// is, a program is created and stored in the cache
- if (BinaryIsInCache()) {
+ if (BinaryIsInCache(device_name_, precision_, routine_name_)) {
try {
- auto& binary = cache::GetBinaryFromCache(device_name_, precision_, routine_name_);
+ auto& binary = GetBinaryFromCache(device_name_, precision_, routine_name_);
auto program = Program(device_, context_, binary);
auto options = std::vector<std::string>();
program.Build(device_, options);
- StoreProgramToCache(program);
+ StoreProgramToCache(program, context_, precision_, routine_name_);
} catch (...) { return StatusCode::kBuildProgramFailure; }
return StatusCode::kSuccess;
}
@@ -121,8 +121,8 @@ StatusCode Routine<T>::SetUp() {
// Store the compiled binary and program in the cache
const auto binary = program.GetIR();
- StoreBinaryToCache(binary);
- StoreProgramToCache(program);
+ StoreBinaryToCache(binary, device_name_, precision_, routine_name_);
+ StoreProgramToCache(program, context_, precision_, routine_name_);
} catch (...) { return StatusCode::kBuildProgramFailure; }
// No errors, normal termination of this function
diff --git a/src/routines/level1/xamax.cc b/src/routines/level1/xamax.cc
index 6028d953..9e203d03 100644
--- a/src/routines/level1/xamax.cc
+++ b/src/routines/level1/xamax.cc
@@ -56,7 +56,7 @@ StatusCode Xamax<T>::DoAmax(const size_t n,
// Retrieves the Xamax kernels from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel1 = Kernel(program, "Xamax");
auto kernel2 = Kernel(program, "XamaxEpilogue");
diff --git a/src/routines/level1/xasum.cc b/src/routines/level1/xasum.cc
index 6046a467..f4d898be 100644
--- a/src/routines/level1/xasum.cc
+++ b/src/routines/level1/xasum.cc
@@ -56,7 +56,7 @@ StatusCode Xasum<T>::DoAsum(const size_t n,
// Retrieves the Xasum kernels from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel1 = Kernel(program, "Xasum");
auto kernel2 = Kernel(program, "XasumEpilogue");
diff --git a/src/routines/level1/xaxpy.cc b/src/routines/level1/xaxpy.cc
index dbc05cf7..221e1195 100644
--- a/src/routines/level1/xaxpy.cc
+++ b/src/routines/level1/xaxpy.cc
@@ -65,7 +65,7 @@ StatusCode Xaxpy<T>::DoAxpy(const size_t n, const T alpha,
// Retrieves the Xaxpy kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Upload the scalar argument as a constant buffer to the device (needed for half-precision)
diff --git a/src/routines/level1/xcopy.cc b/src/routines/level1/xcopy.cc
index 8848201c..647a681a 100644
--- a/src/routines/level1/xcopy.cc
+++ b/src/routines/level1/xcopy.cc
@@ -65,7 +65,7 @@ StatusCode Xcopy<T>::DoCopy(const size_t n,
// Retrieves the Xcopy kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the kernel arguments
diff --git a/src/routines/level1/xdot.cc b/src/routines/level1/xdot.cc
index a819564a..eac64d13 100644
--- a/src/routines/level1/xdot.cc
+++ b/src/routines/level1/xdot.cc
@@ -60,7 +60,7 @@ StatusCode Xdot<T>::DoDot(const size_t n,
// Retrieves the Xdot kernels from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel1 = Kernel(program, "Xdot");
auto kernel2 = Kernel(program, "XdotEpilogue");
diff --git a/src/routines/level1/xnrm2.cc b/src/routines/level1/xnrm2.cc
index 8904c369..23055aac 100644
--- a/src/routines/level1/xnrm2.cc
+++ b/src/routines/level1/xnrm2.cc
@@ -56,7 +56,7 @@ StatusCode Xnrm2<T>::DoNrm2(const size_t n,
// Retrieves the Xnrm2 kernels from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel1 = Kernel(program, "Xnrm2");
auto kernel2 = Kernel(program, "Xnrm2Epilogue");
diff --git a/src/routines/level1/xscal.cc b/src/routines/level1/xscal.cc
index 8078c076..22d2cb5b 100644
--- a/src/routines/level1/xscal.cc
+++ b/src/routines/level1/xscal.cc
@@ -61,7 +61,7 @@ StatusCode Xscal<T>::DoScal(const size_t n, const T alpha,
// Retrieves the Xscal kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the kernel arguments
diff --git a/src/routines/level1/xswap.cc b/src/routines/level1/xswap.cc
index 01184db5..b6996932 100644
--- a/src/routines/level1/xswap.cc
+++ b/src/routines/level1/xswap.cc
@@ -65,7 +65,7 @@ StatusCode Xswap<T>::DoSwap(const size_t n,
// Retrieves the Xswap kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the kernel arguments
diff --git a/src/routines/level2/xgemv.cc b/src/routines/level2/xgemv.cc
index 07c6ec9d..b997673b 100644
--- a/src/routines/level2/xgemv.cc
+++ b/src/routines/level2/xgemv.cc
@@ -143,7 +143,7 @@ StatusCode Xgemv<T>::MatVec(const Layout layout, const Transpose a_transpose,
// Retrieves the Xgemv kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the kernel arguments
diff --git a/src/routines/level2/xger.cc b/src/routines/level2/xger.cc
index c69efc23..e2f7397a 100644
--- a/src/routines/level2/xger.cc
+++ b/src/routines/level2/xger.cc
@@ -71,7 +71,7 @@ StatusCode Xger<T>::DoGer(const Layout layout,
// Retrieves the kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, "Xger");
// Sets the kernel arguments
diff --git a/src/routines/level2/xher.cc b/src/routines/level2/xher.cc
index ed8763dc..3ee3911a 100644
--- a/src/routines/level2/xher.cc
+++ b/src/routines/level2/xher.cc
@@ -85,7 +85,7 @@ StatusCode Xher<T,U>::DoHer(const Layout layout, const Triangle triangle,
// Retrieves the kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, "Xher");
// Sets the kernel arguments
diff --git a/src/routines/level2/xher2.cc b/src/routines/level2/xher2.cc
index 10b98329..9edc1dd9 100644
--- a/src/routines/level2/xher2.cc
+++ b/src/routines/level2/xher2.cc
@@ -73,7 +73,7 @@ StatusCode Xher2<T>::DoHer2(const Layout layout, const Triangle triangle,
// Retrieves the kernel from the compiled binary
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, "Xher2");
// Sets the kernel arguments
diff --git a/src/routines/level3/xgemm.cc b/src/routines/level3/xgemm.cc
index eced53ab..a602e550 100644
--- a/src/routines/level3/xgemm.cc
+++ b/src/routines/level3/xgemm.cc
@@ -112,7 +112,7 @@ StatusCode Xgemm<T>::DoGemm(const Layout layout,
try {
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
// Determines whether or not temporary matrices are needed
auto a_no_temp = a_one == m_ceiled && a_two == k_ceiled && a_ld == m_ceiled && a_offset == 0 &&
diff --git a/src/routines/level3/xhemm.cc b/src/routines/level3/xhemm.cc
index 9791d7b4..8b2c971d 100644
--- a/src/routines/level3/xhemm.cc
+++ b/src/routines/level3/xhemm.cc
@@ -61,7 +61,7 @@ StatusCode Xhemm<T>::DoHemm(const Layout layout, const Side side, const Triangle
// Creates a general matrix from the hermitian matrix to be able to run the regular Xgemm
// routine afterwards
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the arguments for the hermitian-to-squared kernel
diff --git a/src/routines/level3/xher2k.cc b/src/routines/level3/xher2k.cc
index 43f7bb76..8fc70abd 100644
--- a/src/routines/level3/xher2k.cc
+++ b/src/routines/level3/xher2k.cc
@@ -94,7 +94,7 @@ StatusCode Xher2k<T,U>::DoHer2k(const Layout layout, const Triangle triangle, co
try {
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
// Determines whether or not temporary matrices are needed
auto a1_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 &&
diff --git a/src/routines/level3/xherk.cc b/src/routines/level3/xherk.cc
index 8ebcbfa8..af0e32ba 100644
--- a/src/routines/level3/xherk.cc
+++ b/src/routines/level3/xherk.cc
@@ -91,7 +91,7 @@ StatusCode Xherk<T,U>::DoHerk(const Layout layout, const Triangle triangle, cons
try {
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
// Determines whether or not temporary matrices are needed
auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 &&
diff --git a/src/routines/level3/xsymm.cc b/src/routines/level3/xsymm.cc
index 650afbfc..cbacbb71 100644
--- a/src/routines/level3/xsymm.cc
+++ b/src/routines/level3/xsymm.cc
@@ -61,7 +61,7 @@ StatusCode Xsymm<T>::DoSymm(const Layout layout, const Side side, const Triangle
// Creates a general matrix from the symmetric matrix to be able to run the regular Xgemm
// routine afterwards
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the arguments for the symmetric-to-squared kernel
diff --git a/src/routines/level3/xsyr2k.cc b/src/routines/level3/xsyr2k.cc
index 4b436381..88bb5387 100644
--- a/src/routines/level3/xsyr2k.cc
+++ b/src/routines/level3/xsyr2k.cc
@@ -93,7 +93,7 @@ StatusCode Xsyr2k<T>::DoSyr2k(const Layout layout, const Triangle triangle, cons
try {
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
// Determines whether or not temporary matrices are needed
auto a_no_temp = ab_one == n_ceiled && ab_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 &&
diff --git a/src/routines/level3/xsyrk.cc b/src/routines/level3/xsyrk.cc
index 5c49795b..88623ad4 100644
--- a/src/routines/level3/xsyrk.cc
+++ b/src/routines/level3/xsyrk.cc
@@ -89,7 +89,7 @@ StatusCode Xsyrk<T>::DoSyrk(const Layout layout, const Triangle triangle, const
try {
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
// Determines whether or not temporary matrices are needed
auto a_no_temp = a_one == n_ceiled && a_two == k_ceiled && a_ld == n_ceiled && a_offset == 0 &&
diff --git a/src/routines/level3/xtrmm.cc b/src/routines/level3/xtrmm.cc
index 98e0622d..b756d187 100644
--- a/src/routines/level3/xtrmm.cc
+++ b/src/routines/level3/xtrmm.cc
@@ -63,7 +63,7 @@ StatusCode Xtrmm<T>::DoTrmm(const Layout layout, const Side side, const Triangle
// Creates a general matrix from the triangular matrix to be able to run the regular Xgemm
// routine afterwards
try {
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto kernel = Kernel(program, kernel_name);
// Sets the arguments for the triangular-to-squared kernel
diff --git a/src/routines/levelx/xomatcopy.cc b/src/routines/levelx/xomatcopy.cc
index 199a4903..80683b7a 100644
--- a/src/routines/levelx/xomatcopy.cc
+++ b/src/routines/levelx/xomatcopy.cc
@@ -78,7 +78,7 @@ StatusCode Xomatcopy<T>::DoOmatcopy(const Layout layout, const Transpose a_trans
if (ErrorIn(status)) { return status; }
// Loads the program from the database
- const auto program = GetProgramFromCache();
+ const auto program = GetProgramFromCache(context_, precision_, routine_name_);
auto emptyEventList = std::vector<Event>();
status = PadCopyTransposeMatrix(queue_, device_, context_, db_, event_, emptyEventList,