summaryrefslogtreecommitdiff
path: root/src/tuning/kernels/xgemv.cpp
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-07-23 14:52:32 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-07-23 14:52:32 +0200
commit7a4f9637639ce83191bc2d6e8485f9a9dfd949af (patch)
tree6885e17ee3705ac8235309a481b4d248e9542398 /src/tuning/kernels/xgemv.cpp
parent75fe8235f78520fbbfff7c9c035ecd9f1aa3e6f6 (diff)
Further improvements to the XgemvFastRot kernel, properly enables coalescing now
Diffstat (limited to 'src/tuning/kernels/xgemv.cpp')
-rw-r--r--src/tuning/kernels/xgemv.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tuning/kernels/xgemv.cpp b/src/tuning/kernels/xgemv.cpp
index b69e4352..8446e4a9 100644
--- a/src/tuning/kernels/xgemv.cpp
+++ b/src/tuning/kernels/xgemv.cpp
@@ -61,7 +61,7 @@ class TuneXgemv {
// Sets the tuning parameters and their possible values
static void SetParameters(cltune::Tuner &tuner, const size_t id) {
- tuner.AddParameter(id, "WGS"+std::to_string(V), {32, 64, 128, 256});
+ tuner.AddParameter(id, "WGS"+std::to_string(V), {16, 32, 64, 128});
if (V==1 || V==2) { tuner.AddParameter(id, "WPT"+std::to_string(V), {1, 2, 4}); }
else { tuner.AddParameter(id, "WPT"+std::to_string(V), {1, 2, 4, 8, 16, 32}); }
if (V==2 || V==3) { tuner.AddParameter(id, "VW"+std::to_string(V), {1, 2, 4, 8}); }
@@ -69,10 +69,14 @@ class TuneXgemv {
// Sets the constraints and local memory size
static void SetConstraints(cltune::Tuner &tuner, const size_t id) {
- auto MultipleOfX = [] (std::vector<size_t> v) { return IsMultiple(v[0], v[1]); };
if (V==2 || V==3) {
+ auto MultipleOfX = [] (std::vector<size_t> v) { return IsMultiple(v[0], v[1]); };
tuner.AddConstraint(id, MultipleOfX, {"WPT"+std::to_string(V), "VW"+std::to_string(V)});
}
+ if (V==3) {
+ auto LargerOrEqual = [] (std::vector<size_t> v) { return v[0] >= v[1]; };
+ tuner.AddConstraint(id, LargerOrEqual, {"WGS"+std::to_string(V), "WPT"+std::to_string(V)});
+ }
}
static void SetLocalMemorySize(cltune::Tuner &tuner, const size_t id, const Arguments<T> &args) {
if (V==1 || V==2) {