From 5280ca204f87d826e741f8631bf9a01f469ee8f8 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 13 May 2024 18:35:19 +0200 Subject: Rewrote nix drvs to work with sycl itself --- modules/remote-sycl/.nix/derivation.nix | 4 ++-- modules/remote-sycl/SConstruct | 1 + modules/remote-sycl/c++/remote.hpp | 34 +++++++++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 6 deletions(-) (limited to 'modules') 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 +#include + namespace saw { namespace rmt { struct Sycl {}; } +template +class rpc_server { +private: + cl::sycl::queue cmd_queue_; +public: + +}; + template<> class remote { private: SAW_FORBID_COPY(remote); SAW_FORBID_MOVE(remote); + public: + /** + * Default constructor + */ remote(){} - /* - error_or create_remote(){ - return remote{*this}; + /** + * For now we don't need to specify the location since + * we just create a default. + */ + conveyor> resolve_address(){ + return remote_address{*this}; + } + + /** + * Spin up a rpc server + */ + template + conveyor> listen(const remote_address&){ + } - */ }; template<> @@ -38,5 +62,7 @@ public: template error_or foo(); */ + + }; } -- cgit v1.2.3