Skip to content

Commit df79dad

Browse files
committed
Merge branch 'adapters' into cuda-cmd-buffers
2 parents 74f42f8 + 2417fcf commit df79dad

39 files changed

+1013
-792
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ source/adapters/opencl @oneapi-src/unified-runtime-opencl-write
1414
source/adapters/**/command_buffer.* @oneapi-src/unified-runtime-command-buffer-write
1515
scripts/core/EXP-COMMAND-BUFFER.rst @oneapi-src/unified-runtime-command-buffer-write
1616
scripts/core/exp-command-buffer.yml @oneapi-src/unified-runtime-command-buffer-write
17+
18+
# Bindless Images experimental feature
19+
scripts/core/EXP-BINDLESS-IMAGES.rst @oneapi-src/unified-runtime-bindless-images-write
20+
scripts/core/exp-bindless-images.yml @oneapi-src/unified-runtime-bindless-images-write
21+
source/adapters/**/image.* @oneapi-src/unified-runtime-bindless-images-write

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
7-
project(unified-runtime VERSION 0.7.0)
7+
project(unified-runtime VERSION 0.8.0)
88

99
include(GNUInstallDirs)
1010
include(CheckCXXSourceCompiles)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ List of options provided by CMake:
132132
| UR_BUILD_ADAPTER_CUDA | Fetch and use cuda adapter from SYCL | ON/OFF | OFF |
133133
| UR_BUILD_ADAPTER_HIP | Fetch and use hip adapter from SYCL | ON/OFF | OFF |
134134
| UR_HIP_PLATFORM | Build hip adapter for AMD or NVIDIA platform | AMD/NVIDIA | AMD |
135+
| UR_ENABLE_COMGR | Enable comgr lib usage | AMD/NVIDIA | AMD |
135136

136137
### Additional make targets
137138

cmake/helpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function(add_ur_target_compile_options name)
7878
endif()
7979
elseif(MSVC)
8080
target_compile_options(${name} PRIVATE
81-
/MP
81+
$<$<CXX_COMPILER_ID:MSVC>:/MP> # clang-cl.exe does not support /MP
8282
/W3
8383
/MD$<$<CONFIG:Debug>:d>
8484
/GS

include/ur.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
77
88
@file ur.py
9-
@version v0.7-r0
9+
@version v0.8-r0
1010
1111
"""
1212
import platform
@@ -570,7 +570,8 @@ def __str__(self):
570570
class ur_api_version_v(IntEnum):
571571
_0_6 = UR_MAKE_VERSION( 0, 6 ) ## version 0.6
572572
_0_7 = UR_MAKE_VERSION( 0, 7 ) ## version 0.7
573-
CURRENT = UR_MAKE_VERSION( 0, 7 ) ## latest known version
573+
_0_8 = UR_MAKE_VERSION( 0, 8 ) ## version 0.8
574+
CURRENT = UR_MAKE_VERSION( 0, 8 ) ## latest known version
574575

575576
class ur_api_version_t(c_int):
576577
def __str__(self):

include/ur_api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
*
99
* @file ur_api.h
10-
* @version v0.7-r0
10+
* @version v0.8-r0
1111
*
1212
*/
1313
#ifndef UR_API_H_INCLUDED
@@ -1022,7 +1022,8 @@ urPlatformGetInfo(
10221022
typedef enum ur_api_version_t {
10231023
UR_API_VERSION_0_6 = UR_MAKE_VERSION(0, 6), ///< version 0.6
10241024
UR_API_VERSION_0_7 = UR_MAKE_VERSION(0, 7), ///< version 0.7
1025-
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 7), ///< latest known version
1025+
UR_API_VERSION_0_8 = UR_MAKE_VERSION(0, 8), ///< version 0.8
1026+
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 8), ///< latest known version
10261027
/// @cond
10271028
UR_API_VERSION_FORCE_UINT32 = 0x7fffffff
10281029
/// @endcond

include/ur_ddi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
*
99
* @file ur_ddi.h
10-
* @version v0.7-r0
10+
* @version v0.8-r0
1111
*
1212
*/
1313
#ifndef UR_DDI_H_INCLUDED

scripts/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Intel One API Unified Runtime API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.7
41+
PROJECT_NUMBER = v0.8
4242

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

scripts/ci.py

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

scripts/core/INTRO.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,15 @@ Specific environment variables can be set to control the behavior of unified run
296296

297297
This environment variable is ignored when :envvar:`UR_ADAPTERS_FORCE_LOAD` environment variable is used.
298298

299+
.. envvar:: UR_ADAPTERS_DEEP_BIND
300+
301+
If set, the loader will use `RTLD_DEEPBIND` when opening adapter libraries. This might be useful if an adapter
302+
requires a different version of a shared library compared to the rest of the applcation.
303+
304+
.. note::
305+
306+
This environment variable is Linux-only.
307+
299308
.. envvar:: UR_ENABLE_LAYERS
300309

301310
Holds a comma-separated list of layers to enable in addition to any specified via ``urInit``.

scripts/core/platform.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ etors:
133133
- name: "0_7"
134134
value: "$X_MAKE_VERSION( 0, 7 )"
135135
desc: "version 0.7"
136+
- name: "0_8"
137+
value: "$X_MAKE_VERSION( 0, 8 )"
138+
desc: "version 0.8"
136139
--- #--------------------------------------------------------------------------
137140
type: function
138141
desc: "Returns the API version supported by the specified platform"

scripts/parse_specs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import ctypes
1919
import itertools
2020

21-
default_version = "0.7"
22-
all_versions = ["0.6", "0.7"]
21+
default_version = "0.8"
22+
all_versions = ["0.6", "0.7", "0.8"]
2323

2424
"""
2525
preprocess object

scripts/templates/params.hpp.mako

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ from templates import helper as th
3636
${x}_params::serializePtr(os, ${caller.body()});
3737
%elif th.type_traits.is_handle(itype):
3838
${x}_params::serializePtr(os, ${caller.body()});
39+
%elif iname and iname.startswith("pfn"):
40+
os << reinterpret_cast<void*>(${caller.body()});
3941
%else:
4042
os << ${caller.body()};
4143
%endif
@@ -104,7 +106,7 @@ template <> struct is_handle<${th.make_type_name(n, tags, obj)}> : std::true_typ
104106
%endfor
105107
template <typename T>
106108
inline constexpr bool is_handle_v = is_handle<T>::value;
107-
template <typename T> inline void serializePtr(std::ostream &os, T *ptr);
109+
template <typename T> inline void serializePtr(std::ostream &os, const T *ptr);
108110
template <typename T> inline void serializeFlag(std::ostream &os, uint32_t flag);
109111
template <typename T> inline void serializeTagged(std::ostream &os, const void *ptr, T value, size_t size);
110112

@@ -192,7 +194,11 @@ template <typename T> inline void serializeTagged(std::ostream &os, const void *
192194
case ${ename}: {
193195
%if th.value_traits.is_array(vtype):
194196
<% atype = th.value_traits.get_array_name(vtype) %>
197+
%if 'void' in atype:
198+
const ${atype} const *tptr = (const ${atype} const*)ptr;
199+
%else:
195200
const ${atype} *tptr = (const ${atype} *)ptr;
201+
%endif
196202
%if "char" in atype: ## print char* arrays as simple NULL-terminated strings
197203
serializePtr(os, tptr);
198204
%else:
@@ -209,12 +215,16 @@ template <typename T> inline void serializeTagged(std::ostream &os, const void *
209215
os << "}";
210216
%endif
211217
%else:
218+
%if 'void' in vtype:
219+
const ${vtype} const *tptr = (const ${vtype} const *)ptr;
220+
%else:
212221
const ${vtype} *tptr = (const ${vtype} *)ptr;
222+
%endif
213223
if (sizeof(${vtype}) > size) {
214224
os << "invalid size (is: " << size << ", expected: >=" << sizeof(${vtype}) << ")";
215225
return;
216226
}
217-
os << (void *)(tptr) << " (";
227+
os << (const void *)(tptr) << " (";
218228
<%call expr="member(tptr, vtype, False)">
219229
*tptr
220230
</%call>
@@ -237,7 +247,7 @@ template <typename T> inline void serializeTagged(std::ostream &os, const void *
237247
}
238248

239249
## structure type enum value must be first
240-
enum ${th.make_enum_name(n, tags, obj)} *value = (enum ${th.make_enum_name(n, tags, obj)} *)ptr;
250+
const enum ${th.make_enum_name(n, tags, obj)} *value = (const enum ${th.make_enum_name(n, tags, obj)} *)ptr;
241251
switch (*value) {
242252
%for n, item in enumerate(obj['etors']):
243253
<%
@@ -362,21 +372,21 @@ inline std::ostream &operator<<(std::ostream &os, const struct ${th.make_pfncb_p
362372

363373
namespace ${x}_params {
364374

365-
template <typename T> inline void serializePtr(std::ostream &os, T *ptr) {
375+
template <typename T> inline void serializePtr(std::ostream &os, const T *ptr) {
366376
if (ptr == nullptr) {
367377
os << "nullptr";
368378
} else if constexpr (std::is_pointer_v<T>) {
369-
os << (void *)(ptr) << " (";
379+
os << (const void *)(ptr) << " (";
370380
serializePtr(os, *ptr);
371381
os << ")";
372382
} else if constexpr (std::is_void_v<T> || is_handle_v<T *>) {
373-
os << (void *)ptr;
383+
os << (const void *)ptr;
374384
} else if constexpr (std::is_same_v<std::remove_cv_t< T >, char>) {
375-
os << (void *)(ptr) << " (";
385+
os << (const void *)(ptr) << " (";
376386
os << ptr;
377387
os << ")";
378388
} else {
379-
os << (void *)(ptr) << " (";
389+
os << (const void *)(ptr) << " (";
380390
os << *ptr;
381391
os << ")";
382392
}

0 commit comments

Comments
 (0)