You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/elements/oneMKL/source/architecture/api_design.inc.rst
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
.. _onemkl_api_design:
2
2
3
-
API design in oneMKL
4
-
----------------------
5
-
This section discusses the general features of oneMKL API design.
3
+
API Design
4
+
-----------
5
+
6
+
This section discusses the general features of oneMKL API design. In particular, it covers the use of namespaces and data types from C++, from DPC++ and new ones introduced for oneMKL APIs.
6
7
7
8
.. _onemkl_namespaces:
8
9
@@ -34,18 +35,18 @@ oneMKL uses C++ STL data types for scalars where applicable:
34
35
* Integer scalars are C++ fixed-size integer types (``std::intN_t``, ``std::uintN_t``).
35
36
* Complex numbers are represented by C++ ``std::complex`` types.
36
37
37
-
In general, scalar integer arguments to oneMKL routines are 64bit integers (``std::int64_t`` or ``std::uint64_t``). Integer vectors and matrices may have varying bit widths, defined on a per-routine basis.
38
+
In general, scalar integer arguments to oneMKL routines are 64-bit integers (``std::int64_t`` or ``std::uint64_t``). Integer vectors and matrices may have varying bit widths, defined on a per-routine basis.
38
39
39
40
.. _onemkl_dpcpp_datatypes:
40
41
41
42
DPC++ datatype usage
42
43
++++++++++++++++++++
43
44
44
-
oneMKL uses following SYCL Language data types and DPC++ Language Extensions data types:
45
+
oneMKL uses the following DPC++ data types:
45
46
46
47
* SYCL queue ``sycl::queue`` for scheduling kernels on a SYCL device. See :ref:`onemkl_queues` for more details.
47
-
* SYCL buffer ``sycl::buffer`` for bufferbased memory access. See :ref:`onemkl_buffers` for more details.
48
-
* DPC++ Extension Unified Shared Memory (USM) for pointerbased memory access. See :ref:`onemkl_usm` for more details.
48
+
* SYCL buffer ``sycl::buffer`` for buffer-based memory access. See :ref:`onemkl_buffers` for more details.
49
+
* Unified Shared Memory (USM) for pointer-based memory access. See :ref:`onemkl_usm` for more details.
49
50
* SYCL event ``sycl::event`` for output event synchronization in oneMKL routines with USM pointers. See :ref:`onemkl_synchronization_with_usm` for more details.
50
51
* Vector of SYCL events ``sycl::vector_class<sycl::event>`` for input events synchronization in oneMKL routines with USM pointers. See :ref:`onemkl_synchronization_with_usm` for more details.
51
52
@@ -54,7 +55,7 @@ oneMKL uses following SYCL Language data types and DPC++ Language Extensions dat
54
55
oneMKL defined datatypes
55
56
++++++++++++++++++++++++
56
57
57
-
oneMKL linear algebra routines use scoped enum types as type-safe replacements for the traditional character arguments used in BLAS and LAPACK. These types all belong to the ``onemkl`` namespace.
58
+
oneMKL dense and sparse linear algebra routines use scoped enum types as type-safe replacements for the traditional character arguments used in C/Fortran implementations of BLAS and LAPACK. These types all belong to the ``onemkl`` namespace.
58
59
59
60
Each enumeration value comes with two names: A single-character name (the traditional BLAS/LAPACK character) and a longer, more descriptive name. The two names are exactly equivalent and may be used interchangeably.
60
61
@@ -180,3 +181,22 @@ Each enumeration value comes with two names: A single-character name (the tradit
180
181
- ``offset::row``
181
182
- The offset to apply to the output matrix is a row offset, that is to say all the rows in the ``C_offset`` matrix are the same and given by the elements in the ``co`` array.
182
183
184
+
.. rubric:: index_base
185
+
:name: index_base
186
+
:class: sectiontitle
187
+
188
+
The ``index_base`` type specifies how values in index arrays are interpreted. For instance, a sparse matrix stores nonzero values and the
189
+
indices that they correspond to. The indices are traditionally provided in one of two forms: C/C++-style using zero-based
190
+
indices, or Fortran-style using one-based indices. The ``index_base`` type can take the following values:
191
+
192
+
.. container:: tablenoborder
193
+
194
+
.. list-table::
195
+
:header-rows: 1
196
+
197
+
* - Name
198
+
- Description
199
+
* - ``index_base::zero``
200
+
- Index arrays for an input matrix are provided using zero-based (C/C++ style) index values. That is, indices start at 0.
201
+
* - ``index_base::one``
202
+
- Index arrays for an input matrix are provided using one-based (Fortran style) index values. That is, indices start at 1.
Copy file name to clipboardExpand all lines: source/elements/oneMKL/source/architecture/architecture.rst
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,16 @@
3
3
oneMKL Architecture
4
4
====================
5
5
6
+
The oneMKL element of oneAPI has several general assumptions, requirements and recommendations for all domains contained therein. These will be addressed in this architecture section.
7
+
In particular, DPC++ allows for a great control over the execution of kernels on the various devices. We discuss the supported execution models of oneMKL APIs in :ref:`onemkl_execution_model`.
8
+
A discussion of how data is stored and passed in and out of the APIs is addressed in :ref:`onemkl_memory_model`.
9
+
The general structure and design of oneMKL APIs including namespaces and common data types are expressed in :ref:`onemkl_api_design`.
10
+
The exceptions and error handling are described in :ref:`onemkl_exceptions`.
11
+
Finally all the other necessary aspects related to oneMKL architecture can be found in :ref:`onemkl_arch_other` including versioning and discussion of pre and post conditions.
Copy file name to clipboardExpand all lines: source/elements/oneMKL/source/architecture/execution_model.inc.rst
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,14 +3,14 @@
3
3
Execution Model
4
4
---------------
5
5
6
-
This section describes the execution environment common to all oneMKL functionality.
6
+
This section describes the execution environment common to all oneMKL functionality. The execution environment includes how data is provided to computational routines in :ref:`onemkl_queues`, support for several devices in :ref:`onemkl_device_usage`, synchronous and asynchronous exection models in :ref:`onemkl_asynchronous_synchronous_execution` and :ref:`onemkl_host_thread_safety`.
7
7
8
8
.. _onemkl_queues:
9
9
10
-
Queues
11
-
++++++
10
+
Use of Queues
11
+
+++++++++++++
12
12
13
-
Will be added in a future version.
13
+
The ``sycl::queue`` defined in the oneAPI DPC++ specification is used to specify the device and features enabled on that device on which a task will be enqueued. There are two forms of computational routines in oneMKL: class based :ref:`onemkl_member_functions` and standalone :ref:`onemkl_nonmember_functions`. As these may interact with the ``sycl::queue`` in different ways, we provide a section for each one to describe assumptions.
14
14
15
15
16
16
.. _onemkl_nonmember_functions:
@@ -25,7 +25,8 @@ Each oneMKL non-member computational routine takes a ``sycl::queue`` reference a
25
25
All computation performed by the routine shall be done on the hardware device(s) associated with this queue, with possible aid from the host, unless otherwise specified.
26
26
In the case of an ordered queue, all computation shall also be ordered with respect to other kernels as if enqueued on that queue.
27
27
28
-
A particular oneMKL implementation may not support the execution of a given oneMKL routine on the specified device(s). In this case, the implementation may either perform the computation on the host or throw an exception.
28
+
A particular oneMKL implementation may not support the execution of a given oneMKL routine on the specified device(s). In this case, the implementation may either perform the computation on the host or throw an exception. See :ref:`onemkl_exceptions` for the possible exceptions.
This section covers all other features in the design of oneMKL architecture.
6
+
7
+
8
+
9
+
.. _onemkl_spec_versioning:
10
+
11
+
oneMKL Specification Versioning Strategy
12
+
+++++++++++++++++++++++++++++++++++++++++
13
+
14
+
This oneMKL specification uses a ``MAJOR.MINOR.PATCH`` approach for its versioning strategy.
15
+
The ``MAJOR`` count is updated when a significant new feature or domain is added or backward compatibility is broken.
16
+
The ``MINOR`` count is updated when new APIs are changed or added or deleted, or language updated with relatively significant change to the meaning but without breaking backwards compatibility.
17
+
The ``PATCH`` count is updated when wording, language or structure is updated without significant change to the meaning or interpretation.
18
+
19
+
20
+
.. _onemkl_spec_current_version:
21
+
22
+
Current Version of this oneMKL Specification
23
+
+++++++++++++++++++++++++++++++++++++++++++++
24
+
25
+
This is the oneMKL specification version 0.8.0.
26
+
27
+
28
+
.. _onemkl_pre_post_conditions:
29
+
30
+
Pre/Post Condition Checking
31
+
+++++++++++++++++++++++++++++++++++++++
32
+
33
+
The individual oneMKL computational routines will define any preconditions and postconditions and will define in this specification any specific checks or verifications that should be enabled for all implementations.
Copy file name to clipboardExpand all lines: source/elements/oneMKL/source/index.rst
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,9 @@ oneMKL |mkl_version|
9
9
10
10
The |mkl_full_name| (oneMKL) defines a set of fundamental mathematical routines for use in high-performance computing and other applications. As part of oneAPI, oneMKL is designed to allow execution on a wide variety of computational devices: CPUs, GPUs, FPGAs, and other accelerators. The functionality is subdivided into several domains: dense linear algebra, sparse linear algebra, discrete Fourier transforms, random number generators and vector math.
11
11
12
-
The general assumptions, design features and requirements for the oneMKL library and its routines will be described in :ref:`onemkl_architecture`. The individual domains and their APIs are described in :ref:`onemkl_domains`.
12
+
13
+
The general assumptions, design features and requirements for the oneMKL library and host-to-device computational routines will be described in :ref:`onemkl_architecture`.
14
+
The individual domains and their APIs are described in :ref:`onemkl_domains`.
0 commit comments