summaryrefslogtreecommitdiff
path: root/modules/remote-sycl/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-sycl/tests')
-rw-r--r--modules/remote-sycl/tests/data.foo (renamed from modules/remote-sycl/tests/data.cpp)0
-rw-r--r--modules/remote-sycl/tests/data_ref.cpp18
-rw-r--r--modules/remote-sycl/tests/mixed_precision.foo (renamed from modules/remote-sycl/tests/mixed_precision.cpp)0
-rw-r--r--modules/remote-sycl/tests/sycl_basics.cpp31
4 files changed, 32 insertions, 17 deletions
diff --git a/modules/remote-sycl/tests/data.cpp b/modules/remote-sycl/tests/data.foo
index 798b7a5..798b7a5 100644
--- a/modules/remote-sycl/tests/data.cpp
+++ b/modules/remote-sycl/tests/data.foo
diff --git a/modules/remote-sycl/tests/data_ref.cpp b/modules/remote-sycl/tests/data_ref.cpp
new file mode 100644
index 0000000..03afb8f
--- /dev/null
+++ b/modules/remote-sycl/tests/data_ref.cpp
@@ -0,0 +1,18 @@
+#include <forstio/test/suite.hpp>
+
+#include "../c++/data.hpp"
+
+namespace {
+namespace sch {
+using namespace saw::schema;
+}
+
+SAW_TEST("Data Ref Basics"){
+ using namespace saw;
+
+ acpp::sycl::queue sycl_q;
+
+ data<sch::Array<sch::Float64>, encode::Sycl<encode::Native>> dat{{{100u}},sycl_q};
+
+}
+}
diff --git a/modules/remote-sycl/tests/mixed_precision.cpp b/modules/remote-sycl/tests/mixed_precision.foo
index 4a5218d..4a5218d 100644
--- a/modules/remote-sycl/tests/mixed_precision.cpp
+++ b/modules/remote-sycl/tests/mixed_precision.foo
diff --git a/modules/remote-sycl/tests/sycl_basics.cpp b/modules/remote-sycl/tests/sycl_basics.cpp
index 4ad3cf7..970f4d6 100644
--- a/modules/remote-sycl/tests/sycl_basics.cpp
+++ b/modules/remote-sycl/tests/sycl_basics.cpp
@@ -18,6 +18,14 @@ using Foo = Interface<
Member<Function<TestStruct, Void>, "foo">
>;
}
+SAW_TEST("SYCL Basics"){
+ using namespace saw;
+
+ acpp::sycl::queue q;
+ data<schema::TestStruct,encode::Sycl<encode::Native>> host_data;
+}
+
+/*
SAW_TEST("SYCL Test Setup"){
using namespace saw;
@@ -41,33 +49,21 @@ SAW_TEST("SYCL Test Setup"){
data<schema::TestStruct, encode::Sycl<encode::Native>> device_data{host_data};
- interface<schema::Foo, encode::Sycl<encode::Native>,cl::sycl::queue*> cl_iface {
-[&](data<schema::TestStruct, encode::Sycl<encode::Native>>& in, cl::sycl::queue* cmd) -> error_or<void> {
+ interface<schema::Foo, encode::Sycl<encode::Native>,acpp::sycl::queue*> cl_iface {
+[&](data<schema::TestStruct, encode::Sycl<encode::Native>>& in, acpp::sycl::queue* cmd) -> error_or<void> {
- cmd->submit([&](cl::sycl::handler& h){
+ cmd->submit([&](acpp::sycl::handler& h){
- auto acc_buff = in.template access<cl::sycl::access::mode::write>(h);
+ auto acc_buff = in.template access<acpp::sycl::access::mode::write>(h);
auto si = host_data.template get<"doubles">().size();
- h.parallel_for(cl::sycl::range<1>(si.get()), [=] (cl::sycl::id<1> it){
+ h.parallel_for(acpp::sycl::range<1>(si.get()), [=] (acpp::sycl::id<1> it){
acc_buff[0u].template get<"foo">() = acc_buff[0u].template get<"doubles">().size();
auto& dbls = acc_buff[0u].template get<"doubles">();
dbls.at(it[0u]) = it[0u] * 2.0;
});
});
- /*
- cmd->submit([&](cl::sycl::handler& h){
- auto acc_buff = in.template access<cl::sycl::access::mode::read>(h);
- h.copy(acc_buff, &host_data);
- });
- */
-
- /**
- cl::sycl::host_accessor result{in.get_handle()};
- std::cout<<result[0u].template get<"foo">().get()<<std::endl;
- std::cout<<result[0u].template get<"bar">().get()<<std::endl;
- **/
return saw::void_t{};
}
};
@@ -77,4 +73,5 @@ SAW_TEST("SYCL Test Setup"){
cl_iface.template call <"foo">(device_data, &(device.get_handle()));
device.get_handle().wait();
}
+*/
}