.. index:: pair: namespace; dnnl::graph::sycl_interop .. _doxid-namespacednnl_1_1graph_1_1sycl__interop: namespace dnnl::graph::sycl_interop =================================== .. toctree:: :hidden: Overview ~~~~~~~~ SYCL interoperability namespace. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block namespace sycl_interop { // global functions :ref:`allocator` :ref:`make_allocator`( :ref:`dnnl_graph_sycl_allocate_f` sycl_malloc, :ref:`dnnl_graph_sycl_deallocate_f` sycl_free ); :ref:`engine` :target:`make_engine_with_allocator`( const sycl::device& adevice, const sycl::context& acontext, const :ref:`allocator`& alloc ); sycl::event :ref:`execute`( :ref:`compiled_partition`& c_partition, :ref:`stream`& astream, const std::vector<:ref:`tensor`>& inputs, std::vector<:ref:`tensor`>& outputs, const std::vector& deps = {} ); } // namespace sycl_interop .. _details-namespacednnl_1_1graph_1_1sycl__interop: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ SYCL interoperability namespace. Global Functions ---------------- .. index:: pair: function; make_allocator .. _doxid-namespacednnl_1_1graph_1_1sycl__interop_1afbfd5202a21eebb29d010f14bcbbbb13: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`allocator` make_allocator( :ref:`dnnl_graph_sycl_allocate_f` sycl_malloc, :ref:`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. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - sycl_malloc - The pointer to SYCL malloc function * - sycl_free - The pointer to SYCL free function .. rubric:: Returns: Created allocator .. index:: pair: function; execute .. _doxid-namespacednnl_1_1graph_1_1sycl__interop_1acc5ff56ff0f276367b047c3c73093a67: .. ref-code-block:: cpp :class: doxyrest-title-code-block sycl::event execute( :ref:`compiled_partition`& c_partition, :ref:`stream`& astream, const std::vector<:ref:`tensor`>& inputs, std::vector<:ref:`tensor`>& outputs, const std::vector& deps = {} ) Executes a compiled partition in a specified stream and returns a SYCL event. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - 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. .. rubric:: Returns: Output event.