Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cmake/FindCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ if(SYCL_FOUND AND is_dpcpp)
find_library(SYCL_LIBRARY NAMES sycl PATHS "${SYCL_BINARY_DIR}/../lib")

add_library(ONEMKL::SYCL::SYCL INTERFACE IMPORTED)
set_target_properties(ONEMKL::SYCL::SYCL PROPERTIES
if(UNIX)
set_target_properties(ONEMKL::SYCL::SYCL PROPERTIES
INTERFACE_COMPILE_OPTIONS "-fsycl"
INTERFACE_LINK_OPTIONS "-fsycl"
INTERFACE_LINK_LIBRARIES ${SYCL_LIBRARY})
else()
set_target_properties(ONEMKL::SYCL::SYCL PROPERTIES
INTERFACE_COMPILE_OPTIONS "-fsycl"
INTERFACE_LINK_LIBRARIES ${SYCL_LIBRARY})
endif()

endif()
2 changes: 1 addition & 1 deletion cmake/FindMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ if (ENABLE_MKLCPU_BACKEND OR ENABLE_MKLGPU_BACKEND)
list(APPEND MKL_LINK_C ${TBB_LINK})
endif()
if(ENABLE_MKLGPU_BACKEND)
set(MKL_LINK_SYCL ${MKL_LINK_PREFIX} ${LIB_PREFIX}${MKL_SYCL} ${MKL_LINK_C} ${LIB_PREFIX}${OPENCL_LIBNAME})
set(MKL_LINK_SYCL ${MKL_LINK_PREFIX} ${LIB_PREFIX}${MKL_SYCL} ${MKL_LINK_C} ${LIB_PREFIX}${OPENCL_LIBNAME} )
endif()
endif()

Expand Down
112 changes: 87 additions & 25 deletions docs/domains/blas/asum.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _asum:
.. _onemkl_blas_asum:

asum
====
Expand All @@ -10,16 +10,6 @@ asum
Computes the sum of magnitudes of the vector elements.


.. container:: section
:name: GUID-C135E117-8018-473E-BE83-8833C95BB3B5


.. rubric:: Syntax
:name: syntax
:class: sectiontitle


.. cpp:function:: void asum(queue &exec_queue, std::int64_t n, buffer<T,1> &x, std::int64_t incx, buffer<T_res,1> &result)

``asum`` supports the following precisions.

Expand All @@ -42,11 +32,9 @@ asum


.. container:: section
:name: GUID-6AFCECB5-6614-46AC-B921-AB5DED0D22B2


.. rubric:: Description
:name: description
:class: sectiontitle


Expand All @@ -61,16 +49,27 @@ asum
where ``x`` is a vector with ``n`` elements.


asum (Buffer Version)
---------------------

.. container::

.. container:: section


.. rubric:: Syntax
:class: sectiontitle


.. cpp:function:: void onemkl::blas::asum(sycl::queue &queue, std::int64_t n, sycl::buffer<T,1> &x, std::int64_t incx, sycl::buffer<T_res,1> &result)
.. container:: section
:name: GUID-A615800D-734E-4997-BB91-1C76AEEE9EC2


.. rubric:: Input Parameters
:name: input-parameters
:class: sectiontitle


exec_queue
queue
The queue where the routine should be executed.


Expand All @@ -86,15 +85,13 @@ asum


incx
Stride of vector x.
Stride of vector ``x``.


.. container:: section
:name: GUID-2B160DEB-ADBB-4044-8078-4B613A0DA4E1


.. rubric:: Output Parameters
:name: output-parameters
:class: sectiontitle


Expand All @@ -103,19 +100,84 @@ asum
the real and imaginary parts of all elements of the vector).


.. container:: familylinks
asum (USM Version)
------------------

.. container::

.. container:: parentlink
.. container:: section


**Parent topic:** :ref:`blas-level-1-routines`

.. rubric:: Syntax
:class: sectiontitle


.. container::
.. container:: dlsyntaxpara


.. cpp:function:: sycl::event onemkl::blas::asum(sycl::queue &queue, std::int64_t n, const T *x, std::int64_t incx, T_res *result, const sycl::vector_class<sycl::event> &dependencies = {})
.. container:: section


.. rubric:: Input Parameters
:class: sectiontitle


queue
The queue where the routine should be executed.

.. |image0| image:: ../equations/GUID-684BB993-83CA-4605-BD49-E493806C1ee1.png

n
Number of elements in vector ``x``.


x
Pointer to input vector ``x``. The array holding the vector
``x`` must be of size at least (1 + (``n`` - 1)*abs(``incx``)).
See `Matrix and Vector
Storage <../matrix-storage.html>`__ for
more details.


incx
Stride of vector ``x``.


dependencies
List of events to wait for before starting computation, if any.
If omitted, defaults to no dependencies.


.. container:: section


.. rubric:: Output Parameters
:class: sectiontitle


result
Pointer to the output matrix where the scalar result is stored
(the sum of magnitudes of the real and imaginary parts of all
elements of the vector).


.. container:: section


.. rubric:: Return Values
:class: sectiontitle


Output event to wait on to ensure computation is complete.


.. container:: familylinks


.. container:: parentlink


**Parent topic:** :ref:`blas-level-1-routines`
.. |image0| image:: ../equations/GUID-4F76F5A1-251F-4AC0-A2E0-A3B4B6F39ee1.png
:class: img-middle

Loading