Skip to content

Commit

Permalink
Merge remote-tracking branch 'intel/main' into steffen/virtual_mem_ad…
Browse files Browse the repository at this point in the history
…apters
  • Loading branch information
steffenlarsen committed Dec 15, 2023
2 parents cdd252f + dcec3fe commit 0563259
Show file tree
Hide file tree
Showing 87 changed files with 2,458 additions and 6,058 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:

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

fuzztest-build:
name: Build and run quick fuzztest scenarios
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:

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


macos-build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

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

- name: Quick Coverage Info
working-directory: ${{github.workspace}}/build
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ name: coverity-unified-runtime
# It runs static analysis build - Coverity. It requires special token (set in CI's secret).

on:
push:
branches: ["main"]
workflow_dispatch:
schedule:
# Run every day at 22:00 UTC
- cron: '0 22 * * *'

env:
WORKDIR: ${{ github.workspace }}
Expand All @@ -22,10 +23,11 @@ env:
COVERITY_SCAN_BRANCH_PATTERN: "main"
TRAVIS_BRANCH: ${{ github.ref_name }}


jobs:
linux:
name: Coverity
runs-on: ubuntu-latest
runs-on: coverity

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

- name: Configure CMake
run: cmake -B $WORKDIR/build -DUR_ENABLE_TRACING=ON -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUMF_ENABLE_POOL_TRACKING=ON
run: >
cmake
-B $WORKDIR/build
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DUR_BUILD_TESTS=ON
-DUMF_ENABLE_POOL_TRACKING=ON
-DUR_FORMAT_CPP_STYLE=ON
-DCMAKE_BUILD_TYPE=Debug
-DUR_BUILD_ADAPTER_L0=ON
-DUR_BUILD_ADAPTER_CUDA=ON
-DCUDA_CUDA_LIBRARY=/usr/local/cuda/lib64/stubs/libcuda.so
-DUR_BUILD_ADAPTER_NATIVE_CPU=ON
-DUR_BUILD_ADAPTER_HIP=ON
- name: Run Coverity
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/e2e_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
- name: Checkout UR
uses: actions/checkout@v4
with:
ref: adapters
path: ur-repo

- name: Checkout SYCL
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:

steps:
- uses: actions/checkout@v3
# with-ref part to be removed after merging 'adapters' branch with 'main'
with:
ref: adapters

- name: Install pip packages
run: pip install -r third_party/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ option(UR_USE_MSAN "enable MemorySanitizer" OFF)
option(UR_USE_TSAN "enable ThreadSanitizer" OFF)
option(UR_ENABLE_TRACING "enable api tracing through xpti" OFF)
option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF)
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" OFF)
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" ON)
option(UR_BUILD_ADAPTER_L0 "Build the Level-Zero adapter" OFF)
option(UR_BUILD_ADAPTER_OPENCL "Build the OpenCL adapter" OFF)
option(UR_BUILD_ADAPTER_CUDA "Build the CUDA adapter" OFF)
Expand Down
4,305 changes: 0 additions & 4,305 deletions include/ur.py

This file was deleted.

170 changes: 89 additions & 81 deletions include/ur_api.h

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions include/ur_print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ inline std::ostream &operator<<(std::ostream &os, ur_usm_advice_flag_t value);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_host_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_device_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_alloc_location_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_usm_pool_limits_desc_t params);
inline std::ostream &operator<<(std::ostream &os, ur_usm_pool_info_t value);
Expand Down Expand Up @@ -317,7 +318,6 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_sampler_addr_modes_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_mem_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_interop_semaphore_desc_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_layered_image_properties_t params);
inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct ur_exp_command_buffer_desc_t params);
inline std::ostream &operator<<(std::ostream &os, ur_exp_peer_info_t value);

Expand Down Expand Up @@ -993,6 +993,9 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) {
case UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES:
os << "UR_STRUCTURE_TYPE_KERNEL_ARG_LOCAL_PROPERTIES";
break;
case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC:
os << "UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC";
break;
case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC:
os << "UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC";
break;
Expand All @@ -1011,9 +1014,6 @@ inline std::ostream &operator<<(std::ostream &os, ur_structure_type_t value) {
case UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE:
os << "UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE";
break;
case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES:
os << "UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES";
break;
case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES:
os << "UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES";
break;
Expand Down Expand Up @@ -1204,6 +1204,11 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
printPtr(os, pstruct);
} break;

case UR_STRUCTURE_TYPE_USM_ALLOC_LOCATION_DESC: {
const ur_usm_alloc_location_desc_t *pstruct = (const ur_usm_alloc_location_desc_t *)ptr;
printPtr(os, pstruct);
} break;

case UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC: {
const ur_exp_command_buffer_desc_t *pstruct = (const ur_exp_command_buffer_desc_t *)ptr;
printPtr(os, pstruct);
Expand Down Expand Up @@ -1234,11 +1239,6 @@ inline ur_result_t printStruct(std::ostream &os, const void *ptr) {
printPtr(os, pstruct);
} break;

case UR_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES: {
const ur_exp_layered_image_properties_t *pstruct = (const ur_exp_layered_image_properties_t *)ptr;
printPtr(os, pstruct);
} break;

case UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES: {
const ur_exp_sampler_addr_modes_t *pstruct = (const ur_exp_sampler_addr_modes_t *)ptr;
printPtr(os, pstruct);
Expand Down Expand Up @@ -6537,6 +6537,31 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_device_des
return os;
}
///////////////////////////////////////////////////////////////////////////////
/// @brief Print operator for the ur_usm_alloc_location_desc_t type
/// @returns
/// std::ostream &
inline std::ostream &operator<<(std::ostream &os, const struct ur_usm_alloc_location_desc_t params) {
os << "(struct ur_usm_alloc_location_desc_t){";

os << ".stype = ";

os << (params.stype);

os << ", ";
os << ".pNext = ";

ur::details::printStruct(os,
(params.pNext));

os << ", ";
os << ".location = ";

os << (params.location);

os << "}";
return os;
}
///////////////////////////////////////////////////////////////////////////////
/// @brief Print operator for the ur_usm_pool_desc_t type
/// @returns
/// std::ostream &
Expand Down Expand Up @@ -9096,31 +9121,6 @@ inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_interop_se
return os;
}
///////////////////////////////////////////////////////////////////////////////
/// @brief Print operator for the ur_exp_layered_image_properties_t type
/// @returns
/// std::ostream &
inline std::ostream &operator<<(std::ostream &os, const struct ur_exp_layered_image_properties_t params) {
os << "(struct ur_exp_layered_image_properties_t){";

os << ".stype = ";

os << (params.stype);

os << ", ";
os << ".pNext = ";

ur::details::printStruct(os,
(params.pNext));

os << ", ";
os << ".numLayers = ";

os << (params.numLayers);

os << "}";
return os;
}
///////////////////////////////////////////////////////////////////////////////
/// @brief Print operator for the ur_exp_command_buffer_desc_t type
/// @returns
/// std::ostream &
Expand Down Expand Up @@ -12512,10 +12512,10 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
*(params->phQueue));

os << ", ";
os << ".ptr = ";
os << ".pMem = ";

ur::details::printPtr(os,
*(params->pptr));
*(params->ppMem));

os << ", ";
os << ".patternSize = ";
Expand Down
7 changes: 6 additions & 1 deletion scripts/YaML.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,18 @@ class ur_name_t(Structure):
- `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
- `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
- `nocheck` is used to specify that no additional validation checks will be generated.
+ `desc` may include one the following annotations: {`"[optional]"`, `"[range(start,end)]"`, `"[release]"`, `"[typename(typeVarName)]"`}
+ `desc` may include one the following annotations: {`"[optional]"`, `"[range(start,end)]"`, `"[release]"`, `"[typename(typeVarName)]"`, `"[bounds(offset,size)]"`}
- `optional` is used for params that are handles or pointers where it is legal for the value to be `nullptr`
- `range` is used for params that are array pointers to specify the valid range that the is valid to read
+ `start` and `end` must be an ISO-C standard identifier or literal
+ `start` is inclusive and `end` is exclusive
- `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)
- `typename` is used to denote the type enum for params that are opaque pointers to values of tagged data types.
- `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.
+ `offset` and `size` must be an ISO-C standard identifier or literal
+ The sum of `offset` and `size` will be compared against the size of the memory allocation represented by the param.
+ If `offset` and `size` are not both integers they must be of the types `$x_rect_offset` and `$x_rect_region` respectively.
+ If `bounds` is used the operation must also take a parameter of type `$x_queue_handle_t`
+ `type` must be an ISO-C standard identifier
+ `name` must be a unique ISO-C standard identifier
- A param may take the following optional scalar field: {`init`, `version`}
Expand Down
4 changes: 2 additions & 2 deletions scripts/core/CONTRIB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Adapter Change Process
======================

1. Create a pull request containing the adapter changes in the
`oneapi-src/unified-runtime`_ project targeting the `adapters
<https://github.com/oneapi-src/unified-runtime/tree/adapters>`_ branch.
`oneapi-src/unified-runtime`_ project targeting the `main
<https://github.com/oneapi-src/unified-runtime/tree/main>`_ branch.

2. Create a draft pull request in the `intel/llvm`_ project to take advantage
of the pre-merge testing. Add any required implementation changes in
Expand Down
4 changes: 2 additions & 2 deletions scripts/core/EXP-BINDLESS-IMAGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Enums
${X}_STRUCTURE_TYPE_EXP_INTEROP_SEMAPHORE_DESC
${X}_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR
${X}_STRUCTURE_TYPE_EXP_WIN32_HANDLE
${X}_STRUCTURE_TYPE_EXP_LAYERED_IMAGE_PROPERTIES
${X}_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES

* ${x}_device_info_t
Expand Down Expand Up @@ -129,7 +128,6 @@ Types
* ${x}_exp_interop_semaphore_desc_t
* ${x}_exp_file_descriptor_t
* ${x}_exp_win32_handle_t
* ${x}_exp_layered_image_properties_t
* ${x}_exp_sampler_addr_modes_t

Functions
Expand Down Expand Up @@ -184,6 +182,8 @@ Changelog
+----------+-------------------------------------------------------------+
| 8.0 | Added structure for sampler addressing modes per dimension. |
+------------------------------------------------------------------------+
| 9.0 | Remove layered image properties struct. |
+------------------------------------------------------------------------+

Contributors
--------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 0563259

Please sign in to comment.