Skip to content

Commit 0563259

Browse files
committed
Merge remote-tracking branch 'intel/main' into steffen/virtual_mem_adapters
2 parents cdd252f + dcec3fe commit 0563259

Some content is hidden

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

87 files changed

+2458
-6058
lines changed

.github/workflows/cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110

111111
- name: Test
112112
working-directory: ${{github.workspace}}/build
113-
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "python|umf|loader|validation|tracing|unit|urtrace"
113+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
114114

115115
fuzztest-build:
116116
name: Build and run quick fuzztest scenarios
@@ -346,7 +346,7 @@ jobs:
346346

347347
- name: Test
348348
working-directory: ${{github.workspace}}/build
349-
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "python|umf|loader|validation|tracing|unit|urtrace"
349+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
350350

351351

352352
macos-build:

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Test
6767
working-directory: ${{github.workspace}}/build
68-
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "python|umf|loader|validation|tracing|unit|urtrace"
68+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
6969

7070
- name: Quick Coverage Info
7171
working-directory: ${{github.workspace}}/build

.github/workflows/coverity.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ name: coverity-unified-runtime
99
# It runs static analysis build - Coverity. It requires special token (set in CI's secret).
1010

1111
on:
12-
push:
13-
branches: ["main"]
1412
workflow_dispatch:
13+
schedule:
14+
# Run every day at 22:00 UTC
15+
- cron: '0 22 * * *'
1516

1617
env:
1718
WORKDIR: ${{ github.workspace }}
@@ -22,10 +23,11 @@ env:
2223
COVERITY_SCAN_BRANCH_PATTERN: "main"
2324
TRAVIS_BRANCH: ${{ github.ref_name }}
2425

26+
2527
jobs:
2628
linux:
2729
name: Coverity
28-
runs-on: ubuntu-latest
30+
runs-on: coverity
2931

3032
steps:
3133
- name: Clone the git repo
@@ -35,7 +37,20 @@ jobs:
3537
run: pip install -r third_party/requirements.txt
3638

3739
- name: Configure CMake
38-
run: cmake -B $WORKDIR/build -DUR_ENABLE_TRACING=ON -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUMF_ENABLE_POOL_TRACKING=ON
40+
run: >
41+
cmake
42+
-B $WORKDIR/build
43+
-DUR_ENABLE_TRACING=ON
44+
-DUR_DEVELOPER_MODE=ON
45+
-DUR_BUILD_TESTS=ON
46+
-DUMF_ENABLE_POOL_TRACKING=ON
47+
-DUR_FORMAT_CPP_STYLE=ON
48+
-DCMAKE_BUILD_TYPE=Debug
49+
-DUR_BUILD_ADAPTER_L0=ON
50+
-DUR_BUILD_ADAPTER_CUDA=ON
51+
-DCUDA_CUDA_LIBRARY=/usr/local/cuda/lib64/stubs/libcuda.so
52+
-DUR_BUILD_ADAPTER_NATIVE_CPU=ON
53+
-DUR_BUILD_ADAPTER_HIP=ON
3954
4055
- name: Run Coverity
4156
run: |

.github/workflows/e2e_nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
- name: Checkout UR
3131
uses: actions/checkout@v4
3232
with:
33-
ref: adapters
3433
path: ur-repo
3534

3635
- name: Checkout SYCL

.github/workflows/nightly.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v3
20-
# with-ref part to be removed after merging 'adapters' branch with 'main'
21-
with:
22-
ref: adapters
2320

2421
- name: Install pip packages
2522
run: pip install -r third_party/requirements.txt

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ option(UR_USE_MSAN "enable MemorySanitizer" OFF)
3535
option(UR_USE_TSAN "enable ThreadSanitizer" OFF)
3636
option(UR_ENABLE_TRACING "enable api tracing through xpti" OFF)
3737
option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF)
38-
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" OFF)
38+
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" ON)
3939
option(UR_BUILD_ADAPTER_L0 "Build the Level-Zero adapter" OFF)
4040
option(UR_BUILD_ADAPTER_OPENCL "Build the OpenCL adapter" OFF)
4141
option(UR_BUILD_ADAPTER_CUDA "Build the CUDA adapter" OFF)

include/ur.py

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

include/ur_api.h

Lines changed: 89 additions & 81 deletions
Large diffs are not rendered by default.

include/ur_print.hpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_usm_advice_flag_t value);
267267
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_desc_t params);
268268
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_desc_t params);
269269
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_device_desc_t params);
270+
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_alloc_location_desc_t params);
270271
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_desc_t params);
271272
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_limits_desc_t params);
272273
inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_info_t value);
@@ -317,7 +318,6 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
317318
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_sampler_addr_modes_t params);
318319
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_mem_desc_t params);
319320
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_semaphore_desc_t params);
320-
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_layered_image_properties_t params);
321321
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_desc_t params);
322322
inline std::ostream &operator<<(std::ostream &os, ur_exp_peer_info_t value);
323323

@@ -993,6 +993,9 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) {
993993
case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES:
994994
os << "UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES";
995995
break;
996+
case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC:
997+
os << "UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC";
998+
break;
996999
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC:
9971000
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC";
9981001
break;
@@ -1011,9 +1014,6 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) {
10111014
case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE:
10121015
os << "UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE";
10131016
break;
1014-
case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES:
1015-
os << "UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES";
1016-
break;
10171017
case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES:
10181018
os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES";
10191019
break;
@@ -1204,6 +1204,11 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
12041204
printPtr(os, pstruct);
12051205
} break;
12061206

1207+
case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC: {
1208+
const ur_usm_alloc_location_desc_t *pstruct = (const ur_usm_alloc_location_desc_t *)ptr;
1209+
printPtr(os, pstruct);
1210+
} break;
1211+
12071212
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: {
12081213
const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr;
12091214
printPtr(os, pstruct);
@@ -1234,11 +1239,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
12341239
printPtr(os, pstruct);
12351240
} break;
12361241

1237-
case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: {
1238-
const ur_exp_layered_image_properties_t *pstruct = (const ur_exp_layered_image_properties_t *)ptr;
1239-
printPtr(os, pstruct);
1240-
} break;
1241-
12421242
case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: {
12431243
const ur_exp_sampler_addr_modes_t *pstruct = (const ur_exp_sampler_addr_modes_t *)ptr;
12441244
printPtr(os, pstruct);
@@ -6537,6 +6537,31 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_device_des
65376537
return os;
65386538
}
65396539
///////////////////////////////////////////////////////////////////////////////
6540+
/// @brief Print operator for the ur_usm_alloc_location_desc_t type
6541+
/// @returns
6542+
/// std::ostream &
6543+
inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_alloc_location_desc_t params) {
6544+
os << "(struct ur_usm_alloc_location_desc_t){";
6545+
6546+
os << ".stype = ";
6547+
6548+
os << (params.stype);
6549+
6550+
os << ", ";
6551+
os << ".pNext = ";
6552+
6553+
ur::details::printStruct(os,
6554+
(params.pNext));
6555+
6556+
os << ", ";
6557+
os << ".location = ";
6558+
6559+
os << (params.location);
6560+
6561+
os << "}";
6562+
return os;
6563+
}
6564+
///////////////////////////////////////////////////////////////////////////////
65406565
/// @brief Print operator for the ur_usm_pool_desc_t type
65416566
/// @returns
65426567
/// std::ostream &
@@ -9096,31 +9121,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_se
90969121
return os;
90979122
}
90989123
///////////////////////////////////////////////////////////////////////////////
9099-
/// @brief Print operator for the ur_exp_layered_image_properties_t type
9100-
/// @returns
9101-
/// std::ostream &
9102-
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_layered_image_properties_t params) {
9103-
os << "(struct ur_exp_layered_image_properties_t){";
9104-
9105-
os << ".stype = ";
9106-
9107-
os << (params.stype);
9108-
9109-
os << ", ";
9110-
os << ".pNext = ";
9111-
9112-
ur::details::printStruct(os,
9113-
(params.pNext));
9114-
9115-
os << ", ";
9116-
os << ".numLayers = ";
9117-
9118-
os << (params.numLayers);
9119-
9120-
os << "}";
9121-
return os;
9122-
}
9123-
///////////////////////////////////////////////////////////////////////////////
91249124
/// @brief Print operator for the ur_exp_command_buffer_desc_t type
91259125
/// @returns
91269126
/// std::ostream &
@@ -12512,10 +12512,10 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
1251212512
*(params->phQueue));
1251312513

1251412514
os << ", ";
12515-
os << ".ptr = ";
12515+
os << ".pMem = ";
1251612516

1251712517
ur::details::printPtr(os,
12518-
*(params->pptr));
12518+
*(params->ppMem));
1251912519

1252012520
os << ", ";
1252112521
os << ".patternSize = ";

scripts/YaML.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,18 @@ class ur_name_t(Structure):
616616
- `out` is used for params that are write-only; if the param is a pointer, then the memory being pointed to is also write-only
617617
- `in,out` is used for params that are both read and write; typically this is used for pointers to other data structures that contain both read and write params
618618
- `nocheck` is used to specify that no additional validation checks will be generated.
619-
+ `desc` may include one the following annotations: {`"[optional]"`, `"[range(start,end)]"`, `"[release]"`, `"[typename(typeVarName)]"`}
619+
+ `desc` may include one the following annotations: {`"[optional]"`, `"[range(start,end)]"`, `"[release]"`, `"[typename(typeVarName)]"`, `"[bounds(offset,size)]"`}
620620
- `optional` is used for params that are handles or pointers where it is legal for the value to be `nullptr`
621621
- `range` is used for params that are array pointers to specify the valid range that the is valid to read
622622
+ `start` and `end` must be an ISO-C standard identifier or literal
623623
+ `start` is inclusive and `end` is exclusive
624624
- `release` is used for params that are handles or pointers to handles where the function will destroy any backing memory associated with the handle(s)
625625
- `typename` is used to denote the type enum for params that are opaque pointers to values of tagged data types.
626+
- `bounds` is used for params that are memory objects or USM allocations. It specifies the range within the memory allocation represented by the param that will be accessed by the operation.
627+
+ `offset` and `size` must be an ISO-C standard identifier or literal
628+
+ The sum of `offset` and `size` will be compared against the size of the memory allocation represented by the param.
629+
+ If `offset` and `size` are not both integers they must be of the types `$x_rect_offset` and `$x_rect_region` respectively.
630+
+ If `bounds` is used the operation must also take a parameter of type `$x_queue_handle_t`
626631
+ `type` must be an ISO-C standard identifier
627632
+ `name` must be a unique ISO-C standard identifier
628633
- A param may take the following optional scalar field: {`init`, `version`}

0 commit comments

Comments
 (0)