1
1
# Unified Runtime
2
2
3
- [ ![ GHA build status] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg?branch=main )] ( https://github.com/oneapi-src/unified-runtime/actions )
3
+ [ ![ Build and test] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg )] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml )
4
+ [ ![ CodeQL] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml/badge.svg )] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml )
5
+ [ ![ Bandit] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml/badge.svg )] ( https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml )
4
6
5
- > ** Note**
6
- >
7
- > For those who intend to make a contribution to the project please read our
8
- > [ Contribution Guide] ( https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html )
9
- > for more information.
7
+ <!-- TODO: add general description and purpose of the project -->
10
8
11
- ## Contents
9
+ ## Table of contents
10
+
11
+ 1 . [ Contents of the repo] ( #contents-of-the-repo )
12
+ 2 . [ Integration] ( #integration )
13
+ - [ Weekly tags] ( #weekly-tags )
14
+ 3 . [ Third-Party tools] ( #third-party-tools )
15
+ 4 . [ Building] ( #building )
16
+ - [ Windows] ( #windows )
17
+ - [ Linux] ( #linux )
18
+ - [ CMake standard options] ( #cmake-standard-options )
19
+ - [ Additional make targets] ( #additional-make-targets )
20
+ 5 . [ Contributions] ( #contributions )
21
+ - [ Adapter naming convention] ( #adapter-naming-convention )
22
+ - [ Source code generation] ( #source-code-generation )
23
+ - [ Documentation] ( #documentation )
24
+
25
+
26
+ ## Contents of the repo
12
27
13
28
This repo contains the following:
14
29
@@ -41,55 +56,45 @@ add_executable(example example.cpp)
41
56
target_link_libraries(example PUBLIC unified-runtime::headers)
42
57
```
43
58
44
- ### Weekly Tags
59
+ ### Weekly tags
45
60
46
61
Each Friday at 23:00 UTC time a [ prerelease
47
62
tag] ( https://github.com/oneapi-src/unified-runtime/releases ) is created which
48
63
takes the form ` weekly-YYYY-MM-DD ` . These tags should be used by downstream
49
64
projects which intend to track development closely but maintain a fixed point in
50
65
history to avoid pulling potentially breaking changes from the ` main ` branch.
51
66
52
- ## Source Code Generation
53
-
54
- Code is generated using included [ Python scripts] ( /scripts/README.md ) .
55
-
56
- ## Documentation
57
-
58
- Documentation is generated from source code using Sphinx.
59
-
60
- ## Third-Party Tools
67
+ ## Third-Party tools
61
68
62
69
Tools can be acquired via instructions in [ third_party] ( /third_party/README.md ) .
63
70
64
71
## Building
65
72
66
73
Requirements:
67
74
- C++ compiler with C++17 support
68
- - cmake >= 3.14.0
75
+ - [ CMake ] ( https:// cmake.org/ ) >= 3.14.0
69
76
- clang-format-15.0 (can be installed with ` python -m pip install clang-format==15.0.7 ` )
70
77
71
- Project is defined using [ CMake] ( https://cmake.org/ ) .
72
-
73
- ** Windows** :
78
+ ### Windows
74
79
75
- Generating Visual Studio Project. EXE and binaries will be in ** build/bin/{build_config}**
80
+ Generating Visual Studio Project. EXE and binaries will be in ** build/bin/{build_config}**
76
81
77
- ~~~~
82
+ ``` bash
78
83
$ mkdir build
79
84
$ cd build
80
85
$ cmake {path_to_source_dir} -G " Visual Studio 15 2017 Win64"
81
- ~~~~
86
+ ```
82
87
83
- ** Linux** :
88
+ ### Linux
84
89
85
90
Executable and binaries will be in ** build/bin**
86
91
87
- ~~~~
92
+ ``` bash
88
93
$ mkdir build
89
94
$ cd build
90
95
$ cmake {path_to_source_dir}
91
96
$ make
92
- ~~~~
97
+ ```
93
98
94
99
### CMake standard options
95
100
@@ -98,32 +103,36 @@ List of options provided by CMake:
98
103
| Name | Description | Values | Default |
99
104
| - | - | - | - |
100
105
| UR_BUILD_TESTS | Build the tests | ON/OFF | ON |
106
+ | UR_BUILD_TOOLS | Build tools | ON/OFF | ON |
101
107
| UR_FORMAT_CPP_STYLE | Format code style | ON/OFF | OFF |
102
108
| UR_DEVELOPER_MODE | Treat warnings as errors and enables additional checks | ON/OFF | OFF |
103
109
| UR_USE_ASAN | Enable AddressSanitizer | ON/OFF | OFF |
104
110
| UR_USE_UBSAN | Enable UndefinedBehavior Sanitizer | ON/OFF | OFF |
105
111
| UR_USE_MSAN | Enable MemorySanitizer (clang only) | ON/OFF | OFF |
106
112
| UR_ENABLE_TRACING | Enable XPTI-based tracing layer | ON/OFF | OFF |
107
- | UR_BUILD_TOOLS | Build tools | ON/OFF | ON |
108
113
109
- ** General** :
114
+ ### Additional make targets
115
+
116
+ To run automated code formatting, configure CMake with ` UR_FORMAT_CPP_STYLE ` option
117
+ and then run a custom ` cppformat ` target:
110
118
111
- To run automated code formatting build with option ` UR_FORMAT_CPP_STYLE ` and then run a custom ` cppformat ` target:
112
- ~~~~
119
+ ``` bash
113
120
$ make cppformat
114
- ~~~~
121
+ ```
115
122
116
- If you've made modifications to the specification, you can also run a custom ` generate-code ` or ` generate ` target prior to building.
117
- This call will generate the source code:
118
- ~~~~
119
- $ make generate-code
120
- ~~~~
123
+ If you've made modifications to the specification, you can also run
124
+ a custom ` generate ` target prior to building.
125
+ It will generate the source code ** and** run automated code formatting:
121
126
122
- This call will generate the source code and run automated code formatting:
123
- ~~~~
127
+ ``` bash
124
128
$ make generate
125
- ~~~~
126
- Note: ` generate ` target requires ` UR_FORMAT_CPP_STYLE ` to bet set.
129
+ ```
130
+
131
+ ## Contributions
132
+
133
+ For those who intend to make a contribution to the project please read our
134
+ [ Contribution Guide] ( https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html )
135
+ for more information.
127
136
128
137
### Adapter naming convention
129
138
@@ -132,3 +141,12 @@ to use the following naming convention:
132
141
133
142
* On Linux platforms, use ` libur_adapter_[name].so ` .
134
143
* On Windows platforms, use ` ur_adapter_[name].dll ` .
144
+
145
+ ### Source code generation
146
+
147
+ Code is generated using included [ Python scripts] ( /scripts/README.md ) .
148
+
149
+ ### Documentation
150
+
151
+ Documentation is generated from source code using Sphinx -
152
+ see [ scripts dir] ( /scripts/README.md ) for details.
0 commit comments