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``.

0 commit comments

Comments
 (0)