Skip to content

Commit 3e1f163

Browse files
authored
Merge branch 'adapters' into adapter-batch1
2 parents 18d333f + 5e914c5 commit 3e1f163

Some content is hidden

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

52 files changed

+682
-190
lines changed

.github/workflows/cmake.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,10 @@ jobs:
163163
strategy:
164164
matrix:
165165
adapter: [
166-
{name: CUDA, triplet: nvptx64-nvidia-cuda},
167-
{name: HIP, triplet: amdgcn-amd-amdhsa},
168-
{name: L0, triplet: spir64}
166+
{name: CUDA, triplet: nvptx64-nvidia-cuda, platform: ""},
167+
{name: HIP, triplet: amdgcn-amd-amdhsa, platform: ""},
168+
{name: L0, triplet: spir64, platform: ""},
169+
{name: OPENCL, triplet: spir64, platform: "Intel(R) OpenCL"}
169170
]
170171
build_type: [Debug, Release]
171172
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
@@ -219,7 +220,7 @@ jobs:
219220
- name: Test adapters
220221
if: matrix.adapter.name != 'L0'
221222
working-directory: ${{github.workspace}}/build
222-
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
223+
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
223224

224225
examples-build-hw:
225226
name: Build - examples on HW

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.9.0)
88

99
include(GNUInstallDirs)
1010
include(CheckCXXSourceCompiles)

include/ur.py

Lines changed: 4 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.9-r0
1010
1111
"""
1212
import platform
@@ -573,7 +573,9 @@ def __str__(self):
573573
class ur_api_version_v(IntEnum):
574574
_0_6 = UR_MAKE_VERSION( 0, 6 ) ## version 0.6
575575
_0_7 = UR_MAKE_VERSION( 0, 7 ) ## version 0.7
576-
CURRENT = UR_MAKE_VERSION( 0, 7 ) ## latest known version
576+
_0_8 = UR_MAKE_VERSION( 0, 8 ) ## version 0.8
577+
_0_9 = UR_MAKE_VERSION( 0, 9 ) ## version 0.9
578+
CURRENT = UR_MAKE_VERSION( 0, 9 ) ## latest known version
577579

578580
class ur_api_version_t(c_int):
579581
def __str__(self):

include/ur_api.h

Lines changed: 4 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.9-r0
1111
*
1212
*/
1313
#ifndef UR_API_H_INCLUDED
@@ -1025,7 +1025,9 @@ urPlatformGetInfo(
10251025
typedef enum ur_api_version_t {
10261026
UR_API_VERSION_0_6 = UR_MAKE_VERSION(0, 6), ///< version 0.6
10271027
UR_API_VERSION_0_7 = UR_MAKE_VERSION(0, 7), ///< version 0.7
1028-
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 7), ///< latest known version
1028+
UR_API_VERSION_0_8 = UR_MAKE_VERSION(0, 8), ///< version 0.8
1029+
UR_API_VERSION_0_9 = UR_MAKE_VERSION(0, 9), ///< version 0.9
1030+
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 9), ///< latest known version
10291031
/// @cond
10301032
UR_API_VERSION_FORCE_UINT32 = 0x7fffffff
10311033
/// @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.9-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.9
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/core/platform.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ 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"
139+
- name: "0_9"
140+
value: "$X_MAKE_VERSION( 0, 9 )"
141+
desc: "version 0.9"
136142
--- #--------------------------------------------------------------------------
137143
type: function
138144
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.9"
22+
all_versions = ["0.6", "0.7", "0.8", "0.9"]
2323

2424
"""
2525
preprocess object

source/adapters/cuda/command_buffer.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,19 @@ urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
140140
UR_APIEXPORT ur_result_t UR_APICALL
141141
urCommandBufferFinalizeExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
142142
try {
143+
const unsigned long long flags = 0;
144+
#if CUDA_VERSION >= 12000
143145
UR_CHECK_ERROR(cuGraphInstantiate(&hCommandBuffer->CudaGraphExec,
144-
hCommandBuffer->CudaGraph, 0));
146+
hCommandBuffer->CudaGraph, flags));
147+
#elif CUDA_VERSION >= 11040
148+
UR_CHECK_ERROR(cuGraphInstantiateWithFlags(
149+
&hCommandBuffer->CudaGraphExec, hCommandBuffer->CudaGraph, flags));
150+
#else
151+
// Cannot use flags
152+
UR_CHECK_ERROR(cuGraphInstantiate(&hCommandBuffer->CudaGraphExec,
153+
hCommandBuffer->CudaGraph, nullptr,
154+
nullptr, 0));
155+
#endif
145156
} catch (...) {
146157
return UR_RESULT_ERROR_UNKNOWN;
147158
}

source/adapters/cuda/program.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramBuild(ur_context_handle_t hContext,
263263
}
264264

265265
UR_APIEXPORT ur_result_t UR_APICALL urProgramLinkExp(
266-
ur_context_handle_t, uint32_t, const ur_program_handle_t *, uint32_t,
267-
ur_device_handle_t *, const char *, ur_program_handle_t *) {
266+
ur_context_handle_t, uint32_t, ur_device_handle_t *, uint32_t,
267+
const ur_program_handle_t *, const char *, ur_program_handle_t *) {
268268
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
269269
}
270270

0 commit comments

Comments
 (0)