Visible to Intel only — GUID: GUID-5947BC55-4B73-45D6-9F7E-463121CE465B
Visible to Intel only — GUID: GUID-5947BC55-4B73-45D6-9F7E-463121CE465B
namespace dnnl::graph::sycl_interop
Overview
SYCL interoperability namespace. More…
namespace sycl_interop {
// global functions
allocator make_allocator(
dnnl_graph_sycl_allocate_f sycl_malloc,
dnnl_graph_sycl_deallocate_f sycl_free
);
engine make_engine_with_allocator(
const sycl::device& adevice,
const sycl::context& acontext,
const allocator& alloc
);
sycl::event execute(
compiled_partition& c_partition,
stream& astream,
const std::vector<tensor>& inputs,
std::vector<tensor>& outputs,
const std::vector<sycl::event>& deps = {}
);
} // namespace sycl_interop
Detailed Documentation
SYCL interoperability namespace.
Global Functions
allocator make_allocator(
dnnl_graph_sycl_allocate_f sycl_malloc,
dnnl_graph_sycl_deallocate_f sycl_free
)
Constructs an allocator from SYCL malloc and free function pointer.
SYCL allocator should be used for SYCL runtime and host allocator should be used for non-SYCL. Currently, only device USM allocator is supported.
Parameters:
sycl_malloc |
The pointer to SYCL malloc function |
sycl_free |
The pointer to SYCL free function |
Returns:
Created allocator
sycl::event execute(
compiled_partition& c_partition,
stream& astream,
const std::vector<tensor>& inputs,
std::vector<tensor>& outputs,
const std::vector<sycl::event>& deps = {}
)
Executes a compiled partition in a specified stream and returns a SYCL event.
Parameters:
c_partition |
Compiled partition to execute. |
astream |
Stream object to run over |
inputs |
Arguments map. |
outputs |
Arguments map. |
deps |
Optional vector with sycl::event dependencies. |
Returns:
Output event.