Skip to content

Commit def5402

Browse files
authored
Remove deprecated scripts and BLAS list files (#620)
1 parent 40b7e0a commit def5402

File tree

9 files changed

+13
-1097
lines changed

9 files changed

+13
-1097
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
/include/oneapi/math/detail/ @uxlfoundation/onemath-arch-write
1212
/include/oneapi/mkl.hpp @uxlfoundation/onemath-arch-write
1313
/include/oneapi/mkl/namespace_alias.hpp @uxlfoundation/onemath-arch-write
14-
/scripts/ @uxlfoundation/onemath-arch-write
1514
/src/include/ @uxlfoundation/onemath-arch-write
1615
/src/CMakeLists.txt @uxlfoundation/onemath-arch-write
1716
/src/config.hpp.in @uxlfoundation/onemath-arch-write

docs/create_new_backend.rst

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If there is no need for multiple wrappers only ``<domain>`` and ``<3rd-party lib
3030

3131
`5. Update the Test System`_
3232

33-
.. _generate_header_files:
33+
.. _create_header_files:
3434

3535
1. Create Header Files
3636
----------------------
@@ -40,15 +40,7 @@ For each new backend library, you should create the following two header files:
4040
* Header file with a declaration of entry points to the new third-party library wrappers
4141
* Compiler-time dispatching interface (see `oneMath Usage Models <../README.md#supported-usage-models>`_) for new third-party libraries
4242

43-
**Header File Example**: command to generate the header file with a declaration of BLAS entry points in the oneapi::math::newlib namespace
44-
45-
.. code-block:: bash
46-
47-
python scripts/generate_backend_api.py include/oneapi/math/blas.hpp \ # Base header file
48-
include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp \ # Output header file
49-
oneapi::math::newlib # Wrappers namespace
50-
51-
Code snippet of the generated header file ``include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp``
43+
Example header file ``include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp``
5244

5345
.. code-block:: cpp
5446
@@ -61,18 +53,9 @@ Code snippet of the generated header file ``include/oneapi/math/blas/detail/newl
6153
6254
6355
64-
**Compile-time Dispatching Interface Example**: command to generate the compile-time dispatching interface template instantiations for ``newlib`` and supported device ``newdevice``
65-
66-
.. code-block:: bash
67-
68-
python scripts/generate_ct_instant.py include/oneapi/math/blas/detail/blas_ct_templates.hpp \ # Base header file
69-
include/oneapi/math/blas/detail/newlib/blas_ct.hpp \ # Output header file
70-
include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp \ # Header file with declaration of entry points to wrappers
71-
newlib \ # Library name
72-
newdevice \ # Backend name
73-
oneapi::math::newlib # Wrappers namespace
56+
**Compile-time Dispatching Interface Example**:
7457

75-
Code snippet of the generated header file ``include/oneapi/math/blas/detail/newlib/blas_ct.hpp``
58+
Example of the compile-time dispatching interface template instantiations for ``newlib`` and supported device ``newdevice`` in ``include/oneapi/math/blas/detail/newlib/blas_ct.hpp``.
7659

7760
.. code-block:: cpp
7861
@@ -179,9 +162,9 @@ To integrate the new third-party library to a oneMath header-based part, followi
179162
+ if (queue.is_host())
180163
+ device_id=device::newdevice;
181164
182-
* ``include/oneapi/math/blas.hpp``: include the generated header file for the compile-time dispatching interface (see `oneMath Usage Models <../README.md#supported-usage-models>`_)
165+
* ``include/oneapi/math/blas.hpp``: include the created header file for the compile-time dispatching interface (see `oneMath Usage Models <../README.md#supported-usage-models>`_)
183166

184-
**Example**: add ``include/oneapi/math/blas/detail/newlib/blas_ct.hpp`` generated at the `1. Create Header Files`_ step
167+
**Example**: add ``include/oneapi/math/blas/detail/newlib/blas_ct.hpp`` created at the `1. Create Header Files`_ step
185168

186169
.. code-block:: diff
187170
@@ -190,7 +173,7 @@ To integrate the new third-party library to a oneMath header-based part, followi
190173
+ #include "oneapi/math/blas/detail/newlib/blas_ct.hpp"
191174
192175
193-
The new files generated at the `1. Create Header Files`_ step result in the following updated structure of the BLAS domain header files.
176+
The new files created at the `1. Create Header Files`_ step result in the following updated structure of the BLAS domain header files.
194177

195178
.. code-block:: diff
196179
@@ -215,7 +198,7 @@ The new files generated at the `1. Create Header Files`_ step result in the foll
215198
<other backends>/
216199
<other domains>/
217200
218-
.. _generate_wrappers_and_cmake:
201+
.. _create_wrappers_and_cmake:
219202

220203
3. Create Wrappers
221204
------------------
@@ -240,24 +223,13 @@ All wrappers and dispatcher library implementations are in the ``src`` directory
240223

241224
Each backend library should contain a table of all functions from the chosen domain.
242225

243-
``scripts/generate_wrappers.py`` can help to generate wrappers with the "Not implemented" exception for all functions based on the provided header file.
226+
**Example**: Create wrappers for ``newlib`` based on the header files created and integrated previously, and enable only one ``asum`` function
244227

245-
You can modify wrappers generated with this script to enable third-party library functionality.
246-
247-
**Example**: generate wrappers for ``newlib`` based on the header files generated and integrated previously, and enable only one ``asum`` function
248-
249-
The command below generates two new files:
228+
Create two new files:
250229

251230
* ``src/blas/backends/newlib/newlib_wrappers.cpp`` - DPC++ wrappers for all functions from ``include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp``
252231
* ``src/blas/backends/newlib/newlib_wrappers_table_dyn.cpp`` - structure of symbols for run-time dispatcher (in the same location as wrappers), suffix ``_dyn`` indicates that this file is required for dynamic library only.
253232

254-
.. code-block:: bash
255-
256-
python scripts/generate_wrappers.py include/oneapi/math/blas/detail/newlib/onemath_blas_newlib.hpp \ # Base header file
257-
src/blas/function_table.hpp \ # Declaration for structure of symbols
258-
src/blas/backends/newlib/newlib_wrappers.cpp \ # Output wrappers
259-
newlib # Library name
260-
261233
You can then modify ``src/blas/backends/newlib/newlib_wrappers.cpp`` to enable the C function ``newlib_sasum`` from the third-party library ``libnewlib.so``.
262234

263235
To enable this function:
@@ -374,19 +346,11 @@ Here is the list of files that should be created/updated to integrate the new wr
374346
375347
* Create the ``src/<domain>/backends/<new_directory>/CMakeList.txt`` cmake config file to specify how to build the backend layer for the new third-party library.
376348

377-
``scripts/generate_cmake.py`` can help to generate the initial ``src/<domain>/backends/<new_directory>/CMakeList.txt`` config file automatically for all files in the directory.
378-
Note: all source files with the ``_dyn`` suffix are added to build if the target is a dynamic library only.
379-
380-
**Example**: command to generate the cmake config file for the ``src/blas/backends/newlib`` directory
381-
382-
.. code-block:: bash
349+
Check existing backends as a reference to create ``cmake/FindXXX.cmake`` file.
383350

384-
python scripts/generate_cmake.py src/blas/backends/newlib \ # Full path to the directory
385-
newlib # Library name
351+
You should update the config file with information about the new ``cmake/FindXXX.cmake`` file and instructions about how to link with the third-party library.
386352

387-
You should manually update the generated config file with information about the new ``cmake/FindXXX.cmake`` file and instructions about how to link with the third-party library.
388-
389-
**Example**: update the generated ``src/blas/backends/newlib/CMakeLists.txt`` file
353+
**Example**: update the ``src/blas/backends/newlib/CMakeLists.txt`` file
390354

391355
.. code-block:: diff
392356

scripts/blas_list.txt

Lines changed: 0 additions & 178 deletions
This file was deleted.

0 commit comments

Comments
 (0)