summaryrefslogtreecommitdiff
path: root/modules/remote-sycl
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-05-13 18:35:19 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-05-13 18:35:19 +0200
commit5280ca204f87d826e741f8631bf9a01f469ee8f8 (patch)
treee7610c473950002152b253c3b98ad9de5d82f909 /modules/remote-sycl
parent82006ae71c1ff89dc32f2bb4b76c61857b2f6874 (diff)
Rewrote nix drvs to work with sycl itself
Diffstat (limited to 'modules/remote-sycl')
-rw-r--r--modules/remote-sycl/.nix/derivation.nix4
-rw-r--r--modules/remote-sycl/SConstruct1
-rw-r--r--modules/remote-sycl/c++/remote.hpp34
3 files changed, 33 insertions, 6 deletions
diff --git a/modules/remote-sycl/.nix/derivation.nix b/modules/remote-sycl/.nix/derivation.nix
index 2d095df..4c994a9 100644
--- a/modules/remote-sycl/.nix/derivation.nix
+++ b/modules/remote-sycl/.nix/derivation.nix
@@ -4,7 +4,7 @@
, clang-tools
, version
, forstio
-, opencl-clhpp
+, opensycl
}:
let
@@ -27,7 +27,7 @@ in stdenv.mkDerivation {
forstio.async
forstio.io
forstio.io_codec
- opencl-clhpp
+ opensycl
];
outputs = ["out" "dev"];
diff --git a/modules/remote-sycl/SConstruct b/modules/remote-sycl/SConstruct
index e084925..876638a 100644
--- a/modules/remote-sycl/SConstruct
+++ b/modules/remote-sycl/SConstruct
@@ -51,6 +51,7 @@ env=Environment(ENV=os.environ, variables=env_vars, CPPPATH=[],
,'forstio-async'
,'forstio-io'
,'forstio-io_codec'
+ ,'hipSYCL-rt'
#,'OpenCL'
]
);
diff --git a/modules/remote-sycl/c++/remote.hpp b/modules/remote-sycl/c++/remote.hpp
index 3be3c79..1df6249 100644
--- a/modules/remote-sycl/c++/remote.hpp
+++ b/modules/remote-sycl/c++/remote.hpp
@@ -2,24 +2,48 @@
#include <forstio/io_codec/rpc.hpp>
+#include <CL/sycl.hpp>
+
namespace saw {
namespace rmt {
struct Sycl {};
}
+template<typename Iface, typename Encode>
+class rpc_server<Iface, Encode, rmt::Sycl> {
+private:
+ cl::sycl::queue cmd_queue_;
+public:
+
+};
+
template<>
class remote<rmt::Sycl> {
private:
SAW_FORBID_COPY(remote);
SAW_FORBID_MOVE(remote);
+
public:
+ /**
+ * Default constructor
+ */
remote(){}
- /*
- error_or<void> create_remote(){
- return remote<rmt::Sycl>{*this};
+ /**
+ * For now we don't need to specify the location since
+ * we just create a default.
+ */
+ conveyor<remote_address<rmt::Sycl>> resolve_address(){
+ return remote_address<rmt::Sycl>{*this};
+ }
+
+ /**
+ * Spin up a rpc server
+ */
+ template<typename Iface, typename Encoding>
+ conveyor<rpc_server<Iface, Encoding, rmt::Sycl>> listen(const remote_address<rmt::Sycl>&){
+
}
- */
};
template<>
@@ -38,5 +62,7 @@ public:
template<typename Iface>
error_or<void> foo();
*/
+
+
};
}