diff --git a/lib/kernels/templates/dot.cpp b/lib/kernels/templates/dot.cpp index 6fcb7a51c..ee5eca1e2 100644 --- a/lib/kernels/templates/dot.cpp +++ b/lib/kernels/templates/dot.cpp @@ -106,7 +106,7 @@ std::string dot::generate_impl(std::string const & suffix, math_expression const stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << ",1,1)))" << std::endl; break; } - stream << KernelPrefix(backend) << " void " << name[0] << "(" << _size_t << " N, char* tmp," << generate_arguments("#scalartype", device, mapping, expressions) << ")" << std::endl; + stream << KernelPrefix(backend) << " void " << name[0] << "(" << _size_t << " N, " << Global(backend) << " char* tmp," << generate_arguments("#scalartype", device, mapping, expressions) << ")" << std::endl; stream << "{" << std::endl; stream.inc_tab(); @@ -216,7 +216,7 @@ std::string dot::generate_impl(std::string const & suffix, math_expression const - stream << KernelPrefix(backend) << " void " << name[1] << "(" << _size_t << " N, char* tmp, " << generate_arguments("#scalartype", device, mapping, expressions) << ")" << std::endl; + stream << KernelPrefix(backend) << " void " << name[1] << "(" << _size_t << " N, " << Global(backend) << " char* tmp, " << generate_arguments("#scalartype", device, mapping, expressions) << ")" << std::endl; stream << "{" << std::endl; stream.inc_tab(); diff --git a/lib/kernels/templates/gemv.cpp b/lib/kernels/templates/gemv.cpp index 6546d9653..dcf57841e 100644 --- a/lib/kernels/templates/gemv.cpp +++ b/lib/kernels/templates/gemv.cpp @@ -82,7 +82,7 @@ std::string gemv::generate_impl(std::string const & suffix, math_expression cons stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; break; } - stream << KernelPrefix(backend) << " void " << name[0] << "(" << _size_t << " M, " << _size_t << " N, char* tmp, " << generate_arguments("#scalartype", device, mapping, expression) << ")" << std::endl; + stream << KernelPrefix(backend) << " void " << name[0] << "(" << _size_t << " M, " << _size_t << " N, " << Global(backend) << " char* tmp, " << generate_arguments("#scalartype", device, mapping, expression) << ")" << std::endl; stream << "{" << std::endl; stream.inc_tab(); @@ -249,7 +249,7 @@ std::string gemv::generate_impl(std::string const & suffix, math_expression cons if(backend==driver::OPENCL) stream << " __attribute__((reqd_work_group_size(" << p_.local_size_0 << "," << p_.local_size_1 << ",1)))" << std::endl; - stream << KernelPrefix(backend) << " void " << name[1] << "(" << _size_t << " M, " << _size_t << " N, char* tmp, " << generate_arguments("#scalartype", device, mapping, expression) << ")" << std::endl; + stream << KernelPrefix(backend) << " void " << name[1] << "(" << _size_t << " M, " << _size_t << " N , " << Global(backend) << " char* tmp, " << generate_arguments("#scalartype", device, mapping, expression) << ")" << std::endl; stream << "{" << std::endl; stream.inc_tab(); diff --git a/python/setup.py b/python/setup.py index 17f1b6908..1291c2ede 100644 --- a/python/setup.py +++ b/python/setup.py @@ -73,7 +73,7 @@ def main(): libraries += ['gnustl_shared'] #Source files - src = 'src/lib/exception/operation_not_supported.cpp src/lib/exception/unknown_datatype.cpp src/lib/value_scalar.cpp src/lib/driver/check.cpp src/lib/driver/ndrange.cpp src/lib/driver/platform.cpp src/lib/driver/backend.cpp src/lib/driver/program.cpp src/lib/driver/command_queue.cpp src/lib/driver/event.cpp src/lib/driver/kernel.cpp src/lib/driver/handle.cpp src/lib/driver/device.cpp src/lib/driver/program_cache.cpp src/lib/driver/buffer.cpp src/lib/driver/context.cpp src/lib/driver/dispatch.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/stream.cpp src/lib/kernels/keywords.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/binder.cpp src/lib/kernels/parse.cpp src/lib/wrap/clBLAS.cpp src/lib/wrap/cublas.cpp src/lib/profiles/predictors/random_forest.cpp src/lib/profiles/presets.cpp src/lib/profiles/profiles.cpp src/lib/symbolic/execute.cpp src/lib/symbolic/expression.cpp src/lib/symbolic/io.cpp src/lib/symbolic/preset.cpp src/lib/array.cpp '.split() + [os.path.join('src', 'bind', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'kernels.cpp', 'exceptions.cpp']] + src = 'src/lib/symbolic/preset.cpp src/lib/symbolic/execute.cpp src/lib/symbolic/io.cpp src/lib/symbolic/expression.cpp src/lib/array.cpp src/lib/value_scalar.cpp src/lib/driver/backend.cpp src/lib/driver/device.cpp src/lib/driver/kernel.cpp src/lib/driver/buffer.cpp src/lib/driver/platform.cpp src/lib/driver/check.cpp src/lib/driver/program.cpp src/lib/driver/command_queue.cpp src/lib/driver/dispatch.cpp src/lib/driver/program_cache.cpp src/lib/driver/context.cpp src/lib/driver/event.cpp src/lib/driver/ndrange.cpp src/lib/driver/handle.cpp src/lib/exception/unknown_datatype.cpp src/lib/exception/operation_not_supported.cpp src/lib/profiles/presets.cpp src/lib/profiles/profiles.cpp src/lib/profiles/predictors/random_forest.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/stream.cpp src/lib/kernels/parse.cpp src/lib/kernels/keywords.cpp src/lib/kernels/binder.cpp src/lib/wrap/clBLAS.cpp src/lib/wrap/cublas.cpp '.split() + [os.path.join('src', 'bind', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'kernels.cpp', 'exceptions.cpp']] boostsrc = 'external/boost/libs/' for s in ['numpy','python','smart_ptr','system','thread']: src = src + [x for x in recursive_glob('external/boost/libs/' + s + '/src/','.cpp') if 'win32' not in x and 'pthread' not in x] diff --git a/tests/cpp/operations/CMakeLists.txt b/tests/cpp/operations/CMakeLists.txt index 8b1d40654..5917cd8d5 100644 --- a/tests/cpp/operations/CMakeLists.txt +++ b/tests/cpp/operations/CMakeLists.txt @@ -1,3 +1,3 @@ -foreach(NAME axpy dot ger gemv gemm) +foreach(NAME element-wise-1d element-wise-2d reduce-1d reduce-2d matrix-multiply) add_isaac_test(${NAME}) endforeach() diff --git a/tests/cpp/operations/axpy.cpp b/tests/cpp/operations/element-wise-1d.cpp similarity index 100% rename from tests/cpp/operations/axpy.cpp rename to tests/cpp/operations/element-wise-1d.cpp diff --git a/tests/cpp/operations/ger.cpp b/tests/cpp/operations/element-wise-2d.cpp similarity index 100% rename from tests/cpp/operations/ger.cpp rename to tests/cpp/operations/element-wise-2d.cpp diff --git a/tests/cpp/operations/gemm.cpp b/tests/cpp/operations/matrix-multiply.cpp similarity index 100% rename from tests/cpp/operations/gemm.cpp rename to tests/cpp/operations/matrix-multiply.cpp diff --git a/tests/cpp/operations/dot.cpp b/tests/cpp/operations/reduce-1d.cpp similarity index 100% rename from tests/cpp/operations/dot.cpp rename to tests/cpp/operations/reduce-1d.cpp diff --git a/tests/cpp/operations/gemv.cpp b/tests/cpp/operations/reduce-2d.cpp similarity index 100% rename from tests/cpp/operations/gemv.cpp rename to tests/cpp/operations/reduce-2d.cpp