summaryrefslogtreecommitdiff
path: root/scripts/generator/generator/cpp.py
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-10-09 20:06:25 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-10-09 20:06:25 +0200
commit9224da19ef384c1a7986587a682035905f63cf55 (patch)
treecdb5a41f663a2ae28938535e4c6c5b73ed2d49b0 /scripts/generator/generator/cpp.py
parent44246053a595af533308fcd2761664212f28aaaf (diff)
Fixed the Python generator script w.r.t. the recent change of testing direct/in-direct GEMM kernels separately
Diffstat (limited to 'scripts/generator/generator/cpp.py')
-rw-r--r--scripts/generator/generator/cpp.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/generator/generator/cpp.py b/scripts/generator/generator/cpp.py
index 964b8f3e..5fef3083 100644
--- a/scripts/generator/generator/cpp.py
+++ b/scripts/generator/generator/cpp.py
@@ -364,7 +364,9 @@ def performance_test(routine, level_string):
found = False
for flavour in routine.flavours:
if flavour.precision_name == precision:
- result += NL + " clblast::RunClient<clblast::TestX" + routine.plain_name() + flavour.test_template()
+ extra_template_argument = "0, " if routine.name == "gemm" and not routine.batched else ""
+ result += NL + " clblast::RunClient<clblast::TestX" + routine.plain_name()
+ result += flavour.test_template(extra_template_argument)
result += ">(argc, argv); break;" + NL
found = True
if not found:
@@ -384,10 +386,13 @@ def correctness_test(routine, level_string):
result += "int main(int argc, char *argv[]) {" + NL
result += " auto errors = size_t{0};" + NL
not_first = "false"
- for flavour in routine.flavours:
- result += " errors += clblast::RunTests<clblast::TestX" + routine.plain_name() + flavour.test_template()
- result += ">(argc, argv, " + not_first + ", \"" + flavour.name + routine.upper_name() + "\");" + NL
- not_first = "true"
+ extra_template_arguments = ["1, ", "2, "] if routine.name == "gemm" and not routine.batched else [""]
+ for extra_template_argument in extra_template_arguments:
+ for flavour in routine.flavours:
+ result += " errors += clblast::RunTests<clblast::TestX" + routine.plain_name()
+ result += flavour.test_template(extra_template_argument)
+ result += ">(argc, argv, " + not_first + ", \"" + flavour.name + routine.upper_name() + "\");" + NL
+ not_first = "true"
result += " if (errors > 0) { return 1; } else { return 0; }" + NL
result += "}" + NL
return result