-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
user platform / device configuration; sycl exceptions
- Loading branch information
Showing
21 changed files
with
1,116 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#pragma once | ||
|
||
#include "check.hh" | ||
|
||
#include <memory> | ||
|
||
namespace simsycl::detail { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#pragma once | ||
|
||
#include <exception> | ||
#include <functional> | ||
#include <vector> | ||
|
||
|
||
namespace simsycl::sycl { | ||
|
||
class exception_list : private std::vector<std::exception_ptr> { | ||
// Used as a container for a list of asynchronous exceptions | ||
public: | ||
using value_type = std::exception_ptr; | ||
using reference = value_type &; | ||
using const_reference = const value_type &; | ||
using size_type = std::size_t; | ||
|
||
using std::vector<std::exception_ptr>::const_iterator; | ||
using iterator = const_iterator; | ||
|
||
using std::vector<std::exception_ptr>::size; | ||
iterator begin() const { return std::vector<std::exception_ptr>::begin(); } | ||
iterator end() const { return std::vector<std::exception_ptr>::end(); } | ||
}; | ||
|
||
using async_handler = std::function<void(sycl::exception_list)>; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#pragma once | ||
|
||
#include "enums.hh" | ||
#include "forward.hh" | ||
#include "property.hh" | ||
|
||
#include <vector> | ||
|
||
|
||
namespace simsycl::sycl { | ||
|
||
class kernel_id { /* ... */ | ||
}; | ||
|
||
template<bundle_state State> | ||
class kernel_bundle { /* ... */ | ||
}; | ||
|
||
template<typename KernelName> | ||
kernel_id get_kernel_id(); | ||
|
||
std::vector<kernel_id> get_kernel_ids(); | ||
|
||
template<bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt); | ||
|
||
template<bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt, const std::vector<kernel_id> &kernel_ids); | ||
|
||
template<typename KernelName, bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt); | ||
|
||
template<bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt, const std::vector<device> &devs); | ||
|
||
template<bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle( | ||
const context &ctxt, const std::vector<device> &devs, const std::vector<kernel_id> &kernel_ids); | ||
|
||
template<typename KernelName, bundle_state State> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt, const std::vector<device> &devs); | ||
|
||
template<bundle_state State, typename Selector> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt, Selector selector); | ||
|
||
template<bundle_state State, typename Selector> | ||
kernel_bundle<State> get_kernel_bundle(const context &ctxt, const std::vector<device> &devs, Selector selector); | ||
|
||
template<bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt); | ||
|
||
template<bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt, const std::vector<kernel_id> &kernel_ids); | ||
|
||
template<typename KernelName, bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt); | ||
|
||
template<bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt, const std::vector<device> &devs); | ||
|
||
template<bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt, const std::vector<device> &devs, const std::vector<kernel_id> &kernel_ids); | ||
|
||
template<typename KernelName, bundle_state State> | ||
bool has_kernel_bundle(const context &ctxt, const std::vector<device> &devs); | ||
|
||
bool is_compatible(const std::vector<kernel_id> &kernel_ids, const device &dev); | ||
|
||
template<typename KernelName> | ||
bool is_compatible(const device &dev); | ||
|
||
template<bundle_state State> | ||
kernel_bundle<State> join(const std::vector<kernel_bundle<State>> &bundles); | ||
|
||
kernel_bundle<bundle_state::object> compile( | ||
const kernel_bundle<bundle_state::input> &input_bundle, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::object> compile(const kernel_bundle<bundle_state::input> &input_bundle, | ||
const std::vector<device> &devs, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> link( | ||
const kernel_bundle<bundle_state::object> &object_bundle, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> link( | ||
const std::vector<kernel_bundle<bundle_state::object>> &object_bundles, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> link(const kernel_bundle<bundle_state::object> &object_bundle, | ||
const std::vector<device> &devs, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> link(const std::vector<kernel_bundle<bundle_state::object>> &object_bundles, | ||
const std::vector<device> &devs, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> build( | ||
const kernel_bundle<bundle_state::input> &input_bundle, const property_list &prop_list = {}); | ||
|
||
kernel_bundle<bundle_state::executable> build(const kernel_bundle<bundle_state::input> &input_bundle, | ||
const std::vector<device> &devs, const property_list &prop_list = {}); | ||
|
||
} // namespace simsycl::sycl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.