Skip to content

Commit c212ec2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into uwe/native_cpu
2 parents 8c5a216 + 4dbbe01 commit c212ec2

File tree

22 files changed

+238
-26
lines changed

22 files changed

+238
-26
lines changed

.github/workflows/cmake.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
- name: Generate source from spec, check for uncommitted diff
8282
if: matrix.os == 'ubuntu-22.04'
8383
run: cmake --build ${{github.workspace}}/build --target check-generated
84+
85+
- name: Verify that each source file contains a license
86+
run: cmake --build ${{github.workspace}}/build --target verify-licenses
8487

8588
- name: Build
8689
run: cmake --build ${{github.workspace}}/build -j $(nproc)

CMakeLists.txt

Lines changed: 20 additions & 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.6.0)
7+
project(unified-runtime VERSION 0.7.0)
88

99
include(GNUInstallDirs)
1010
include(CheckCXXSourceCompiles)
@@ -157,6 +157,7 @@ endif()
157157

158158
# Obtain files for clang-format
159159
set(format_glob)
160+
set(license_glob)
160161
foreach(dir examples include source test tools)
161162
list(APPEND format_glob
162163
"${dir}/*.h"
@@ -167,8 +168,26 @@ foreach(dir examples include source test tools)
167168
"${dir}/**/*.hpp"
168169
"${dir}/**/*.c"
169170
"${dir}/**/*.cpp")
171+
list(APPEND license_glob
172+
"${dir}/*.yml"
173+
"${dir}/**/*.yml"
174+
"${dir}/*.py"
175+
"${dir}/**/*.py"
176+
"${dir}/**/CMakeLists.txt"
177+
"${dir}/CMakeLists.txt"
178+
)
170179
endforeach()
171180
file(GLOB_RECURSE format_src ${format_glob})
181+
file(GLOB_RECURSE license_src ${license_glob})
182+
183+
# check for licence
184+
list(FILTER license_src EXCLUDE REGEX "registry.yml")
185+
add_custom_target(verify-licenses
186+
COMMAND ${Python3_EXECUTABLE}
187+
"${PROJECT_SOURCE_DIR}/scripts/verify_license.py"
188+
"--files" ${format_src} ${license_src}
189+
COMMENT "Verify all files contain a license."
190+
)
172191

173192
# Add code formatter target
174193
add_custom_target(cppformat)

cmake/helpers.cmake

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ function(add_ur_target_compile_options name)
6666
$<$<CXX_COMPILER_ID:GNU>:-fdiagnostics-color=always>
6767
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-fcolor-diagnostics>
6868
)
69-
7069
if (CMAKE_BUILD_TYPE STREQUAL "Release")
7170
target_compile_definitions(${name} PRIVATE -D_FORTIFY_SOURCE=2)
7271
endif()
@@ -84,27 +83,46 @@ function(add_ur_target_compile_options name)
8483
/MD$<$<CONFIG:Debug>:d>
8584
/GS
8685
)
87-
add_link_options(
86+
87+
if(UR_DEVELOPER_MODE)
88+
target_compile_options(${name} PRIVATE /WX /GS)
89+
endif()
90+
endif()
91+
endfunction()
92+
93+
function(add_ur_target_link_options name)
94+
if(NOT MSVC)
95+
if (NOT APPLE)
96+
target_link_options(${name} PRIVATE "LINKER:-z,relro,-z,now")
97+
endif()
98+
elseif(MSVC)
99+
target_link_options(${name} PRIVATE
88100
/DYNAMICBASE
89101
/HIGHENTROPYVA
90-
/ALLOWISOLATION
91102
/NXCOMPAT
92103
)
104+
endif()
105+
endfunction()
93106

94-
if(UR_DEVELOPER_MODE)
95-
target_compile_options(${name} PRIVATE /WX /GS)
96-
endif()
107+
function(add_ur_target_exec_options name)
108+
if(MSVC)
109+
target_link_options(${name} PRIVATE
110+
/ALLOWISOLATION
111+
)
97112
endif()
98113
endfunction()
99114

100115
function(add_ur_executable name)
101116
add_executable(${name} ${ARGN})
102117
add_ur_target_compile_options(${name})
118+
add_ur_target_exec_options(${name})
119+
add_ur_target_link_options(${name})
103120
endfunction()
104121

105122
function(add_ur_library name)
106123
add_library(${name} ${ARGN})
107124
add_ur_target_compile_options(${name})
125+
add_ur_target_link_options(${name})
108126
endfunction()
109127

110128
include(FetchContent)

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.6-r0
9+
@version v0.7-r0
1010
1111
"""
1212
import platform
@@ -569,7 +569,8 @@ def __str__(self):
569569
## ::UR_MAJOR_VERSION and ::UR_MINOR_VERSION
570570
class ur_api_version_v(IntEnum):
571571
_0_6 = UR_MAKE_VERSION( 0, 6 ) ## version 0.6
572-
CURRENT = UR_MAKE_VERSION( 0, 6 ) ## latest known version
572+
_0_7 = UR_MAKE_VERSION( 0, 7 ) ## version 0.7
573+
CURRENT = UR_MAKE_VERSION( 0, 7 ) ## latest known version
573574

574575
class ur_api_version_t(c_int):
575576
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.6-r0
10+
* @version v0.7-r0
1111
*
1212
*/
1313
#ifndef UR_API_H_INCLUDED
@@ -1021,7 +1021,8 @@ urPlatformGetInfo(
10211021
/// ::UR_MAJOR_VERSION and ::UR_MINOR_VERSION
10221022
typedef enum ur_api_version_t {
10231023
UR_API_VERSION_0_6 = UR_MAKE_VERSION(0, 6), ///< version 0.6
1024-
UR_API_VERSION_CURRENT = UR_MAKE_VERSION(0, 6), ///< latest known version
1024+
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
10251026
/// @cond
10261027
UR_API_VERSION_FORCE_UINT32 = 0x7fffffff
10271028
/// @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.6-r0
10+
* @version v0.7-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.6
41+
PROJECT_NUMBER = v0.7
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/exp-bindless-images.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#
2+
# Copyright (C) 2023 Intel Corporation
3+
#
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
#
8+
# See YaML.md for syntax definition
9+
#
110
--- #--------------------------------------------------------------------------
211
type: header
312
desc: "Bindless Images Extension APIs"

scripts/core/exp-usm-import-release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
#
2+
# Copyright (C) 2023 Intel Corporation
3+
#
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
#
8+
# See YaML.md for syntax definition
9+
#
110
--- #--------------------------------------------------------------------------
211
type: header
312
desc: "Intel $OneApi USM Import/Release Extension APIs"

scripts/core/platform.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ etors:
130130
- name: "0_6"
131131
value: "$X_MAKE_VERSION( 0, 6 )"
132132
desc: "version 0.6"
133+
- name: "0_7"
134+
value: "$X_MAKE_VERSION( 0, 7 )"
135+
desc: "version 0.7"
133136
--- #--------------------------------------------------------------------------
134137
type: function
135138
desc: "Returns the API version supported by the specified platform"

0 commit comments

Comments
 (0)