Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 55465dd

Browse files
committed
DML release v0.1.9-beta
1 parent 5a29563 commit 55465dd

File tree

217 files changed

+24575
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+24575
-288
lines changed

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
# Exlude build paths (local and remote)
6+
/*build*
7+
/*remote*
8+
9+
# Doc build folder
10+
doc/build
11+
doc/doxygen_html
12+
13+
# Exlude html documentation generated by doxygen
14+
doc/html/*
15+
16+
# Exclude IDE projects
17+
.idea/
18+
.vscode/

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "google-test"]
2+
path = google-test
3+
url = https://github.com/google/googletest.git
4+
branch = release-1.11.0

CMakeLists.txt

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
6-
project(Dml VERSION 0.1.8 LANGUAGES C CXX)
6+
project(Dml VERSION 0.1.9 LANGUAGES C CXX)
77

88
set(PROJECT_SOVERSION 0)
99

@@ -14,9 +14,36 @@ else()
1414
endif()
1515

1616
# TODO: Remove all options below
17+
option(SANITIZE_MEMORY "Enables memory sanitizing" OFF)
18+
option(SANITIZE_THREADS "Enables threads sanitizing" OFF)
1719
option(LOG_HW_INIT "Enables HW initialization log" OFF)
1820
option(EFFICIENT_WAIT "Enables usage of umonitor/umwait" OFF)
1921

22+
if (SANITIZE_MEMORY)
23+
message(STATUS "Memory sanitizing build is enabled")
24+
25+
if (WIN32)
26+
message(FATAL_ERROR "Memory sanitizing is not supported in Windows")
27+
else ()
28+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=leak -g")
29+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=leak -g")
30+
endif ()
31+
endif ()
32+
33+
if (SANITIZE_THREADS)
34+
message(STATUS "Threads sanitizing build is enabled")
35+
36+
if (WIN32)
37+
message(FATAL_ERROR "Threads sanitizing is not supported in Windows")
38+
else ()
39+
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
40+
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
41+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -g")
42+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -g")
43+
endif ()
44+
endif ()
45+
46+
include(cmake/tests.cmake)
2047
include(cmake/CompileOptions.cmake)
2148
include(cmake/utils.cmake)
2249
include(CMakePackageConfigHelpers)
@@ -48,6 +75,15 @@ message(STATUS "Hardware initialization logging: ${LOG_HW_INIT}")
4875
get_git_revision()
4976

5077
add_subdirectory(sources)
78+
79+
# Dependencies
80+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
81+
set(BUILD_GMOCK OFF CACHE BOOL "Suppress gmock build" FORCE)
82+
set(INSTALL_GTEST OFF CACHE BOOL "Suppress gtest installation" FORCE)
83+
add_subdirectory(google-test)
84+
85+
# Testing
86+
add_subdirectory(tests)
5187
add_subdirectory(examples)
5288

5389
# Install rules

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PROJECT_NAME = "Intel DML Library"
4242
# could be handy for archiving the generated documentation or if some version
4343
# control system is used.
4444

45-
PROJECT_NUMBER = "v0.1.8-beta"
45+
PROJECT_NUMBER = "v0.1.9-beta"
4646

4747
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4848
# for a project that appears at the top of each page and should give viewer a

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ After generation process is completed, open the `<dml_library>/doc/build/html/in
3535

3636
See [Contributing document](./CONTRIBUTING.md) for details about contribution process.
3737

38+
## How to Report Issues
39+
40+
See [Issue Reporting](https://intel.github.io/DML/documentation/introduction_docs/issue_reporting.html) for details about issue reporting process.
41+
3842
## License
3943

4044
The library is licensed under the MIT license. Refer to the

cmake/tests.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
enable_testing()

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
project = 'Intel® DML'
2121
copyright = '2022, Intel'
2222
author = 'Intel'
23-
release = 'v0.1.8-beta'
23+
release = 'v0.1.9-beta'
2424

2525
# -- General configuration ---------------------------------------------------
2626

doc/source/documentation/api_docs/low_level_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ The Memory Copy with Dualcast operation copies memory from the
381381
thrown.
382382

383383
Fill
384-
''''
384+
----
385385

386386

387387
The Memory Fill operation fills the memory at ``destination_first_ptr``

doc/source/documentation/get_started_docs/code_samples_and_examples.rst

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The ``<dml_library>/examples/dml_job_api/job_wrapper_examples.c`` source
1616
file contains a number of simple examples, illustrating how you can use
1717
Intel DML.
1818

19-
The wrappers descriptions are placed in the ``dml_examples.h``
19+
The wrapper's descriptions are placed in the ``dml_examples.h``
2020
header file.
2121

2222
The examples are compiled during the Intel DML project compilation or
@@ -27,3 +27,106 @@ as a separate CMake target (``job_api_samples``).
2727
These examples are intended to be illustrative and functional,
2828
but they are not intended to be examples of a complete implementation.
2929
In particular, their handling of error conditions is rather primitive.
30+
31+
32+
Multi-Socket Library Usage
33+
==========================
34+
35+
36+
This sample shows how to utilize several sockets on the system using manual ``numa_id``
37+
setting in the ``dml_job_t`` structure. Thus, the ``memory_move`` operation can be applied
38+
to one data array using several sockets at the same time.
39+
40+
41+
.. literalinclude:: ../../../../examples/multisocket.c
42+
:language: c
43+
44+
45+
High-level C++ API Examples
46+
***************************
47+
48+
49+
cache_flush
50+
===========
51+
52+
53+
.. literalinclude:: ../../../../examples/high_level_api/cache_flush.cpp
54+
:language: cpp
55+
56+
57+
compare_pattern
58+
===============
59+
60+
61+
.. literalinclude:: ../../../../examples/high_level_api/compare_pattern.cpp
62+
:language: cpp
63+
64+
65+
compare
66+
=======
67+
68+
69+
.. literalinclude:: ../../../../examples/high_level_api/compare.cpp
70+
:language: cpp
71+
72+
73+
copy_crc
74+
========
75+
76+
77+
.. literalinclude:: ../../../../examples/high_level_api/copy_crc.cpp
78+
:language: cpp
79+
80+
81+
crc
82+
===
83+
84+
85+
.. literalinclude:: ../../../../examples/high_level_api/crc.cpp
86+
:language: cpp
87+
88+
89+
delta
90+
=====
91+
92+
93+
.. literalinclude:: ../../../../examples/high_level_api/delta.cpp
94+
:language: cpp
95+
96+
97+
dualcast
98+
========
99+
100+
101+
.. literalinclude:: ../../../../examples/high_level_api/dualcast.cpp
102+
:language: cpp
103+
104+
105+
fill
106+
====
107+
108+
109+
.. literalinclude:: ../../../../examples/high_level_api/fill.cpp
110+
:language: cpp
111+
112+
113+
mem_move
114+
========
115+
116+
117+
.. literalinclude:: ../../../../examples/high_level_api/mem_move.cpp
118+
:language: cpp
119+
120+
121+
122+
Multi-Socket Library Usage
123+
==========================
124+
125+
126+
This sample shows how to utilize several sockets on the system.
127+
Thus, the ``memory_move`` operation can be applied
128+
to one data array using several sockets at the same time.
129+
130+
131+
.. literalinclude:: ../../../../examples/multisocket.cpp
132+
:language: cpp
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.. ***************************************************************************
2+
.. * Copyright (C) 2021 Intel Corporation
3+
.. *
4+
.. * SPDX-License-Identifier: MIT
5+
.. ***************************************************************************/
6+
7+
8+
Test Library
9+
############
10+
11+
12+
To test the library, refer for the instructions to the
13+
`Testing document <https://github.com/intel/DML/tests/README.md>`__ placed in ``<dml_project_dir>/tests/README.md``.

doc/source/documentation/introduction_docs/introduction.rst

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ of available modern CPU capabilities. This can provide tremendous
2121
development and maintenance savings. The goal of the Intel DML is to
2222
provide application programming interface (API) with:
2323

24-
- a simple C/C++ interface and data structures to enhance usability and
25-
portability
24+
- a simple C/C++ interface and data structures to enhance usability and portability
2625
- faster time-to-market
2726
- scalability with Intel® Data Streaming Accelerator (Intel® DSA) hardware
2827

@@ -54,12 +53,10 @@ Library Limitations
5453
*******************
5554

5655

57-
- Library doesn’t work with Dedicated WQs for the accelerator, but uses
58-
shared ones only.
59-
- Library doesn’t have API for the hardware path configuration.
60-
- Library doesn’t support Hardware execution path on Windows OS.
61-
- Library is not developed for kernel mode usage. It is user level
62-
driver library.
56+
- Library does not work with Dedicated WQs for the accelerator, but uses shared ones only.
57+
- Library does not have API for the hardware path configuration.
58+
- Library does not support Hardware execution path on Windows OS.
59+
- Library is not developed for kernel mode usage. It is user level driver library.
6360

6461
Library APIs
6562
************
@@ -73,7 +70,7 @@ possibilities through different languages and paradigms: -
7370

7471
Represents a state based interface. The base idea is to allocate a
7572
single state and configure one with different ways to perform necessary
76-
operation. Such API doesn’t allocate memory internally.
73+
operation. Such API does not allocate memory internally.
7774

7875
More details: `C API Manual <../api_docs/low_level_api.html>`_
7976

@@ -83,41 +80,3 @@ Represents high level operations API written with C++. API provides
8380
compile time optimizations and less operation preparation latency.
8481

8582
More details: `C++ API Manual <../api_docs/high_level_api.html>`__
86-
87-
Issue Reporting & Classification
88-
********************************
89-
90-
91-
Intel DML has several execution paths and large number of different
92-
operations and modes, thus correct issue description is important. Well
93-
filled description helps to detect and solve problems faster.
94-
Use GitHub issues to report any problems.
95-
96-
Issues can be classified depending on the step where they occur:
97-
98-
- Configuration step.
99-
- Hardware path initialization step
100-
- [TBD] Operation execution step.
101-
102-
All these classes are described below:
103-
104-
**Configuration step issues:**
105-
106-
Intel DML library works with accelerator configuration created by
107-
system administrator. There can be a lot of different problems. They can
108-
affect library work correctness. To avoid these problems follow
109-
instructions in the `Library presetting
110-
<../get_started_docs/installation.html#library-presetting-and-building>`__
111-
section. These classes of issue are placed out of scope Intel DML
112-
library and can be addressed to **idxd-driver** team or **idxd-config**
113-
team.
114-
115-
**Initialization step issues:**
116-
117-
Intel DML library has 2 different status code groups. The first group
118-
helps to detect initialization issues. This issue can be caused by:
119-
120-
- Incorrect configuration, that library doesn’t support by reason listed
121-
in `Library Limitation <#library-limitations>`__ section
122-
- Bug in the library initialization code.
123-
This kind of problem must be reported to Intel DML team.

0 commit comments

Comments
 (0)