Skip to content

Commit 95a4621

Browse files
committed
sync with latest ur
Signed-off-by: jinge90 <[email protected]>
2 parents 0461a8f + 717791b commit 95a4621

File tree

113 files changed

+4392
-1447
lines changed

Some content is hidden

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

113 files changed

+4392
-1447
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ source/adapters/opencl @oneapi-src/unified-runtime-opencl-write
1414
source/adapters/native_cpu @oneapi-src/unified-runtime-native-cpu-write
1515

1616
# Command-buffer experimental feature
17-
source/adapters/**/command_buffer.* @oneapi-src/unified-runtime-command-buffer-write
18-
scripts/core/EXP-COMMAND-BUFFER.rst @oneapi-src/unified-runtime-command-buffer-write
19-
scripts/core/exp-command-buffer.yml @oneapi-src/unified-runtime-command-buffer-write
17+
source/adapters/**/command_buffer.* @oneapi-src/unified-runtime-command-buffer-write
18+
scripts/core/EXP-COMMAND-BUFFER.rst @oneapi-src/unified-runtime-command-buffer-write
19+
scripts/core/exp-command-buffer.yml @oneapi-src/unified-runtime-command-buffer-write
20+
test/conformance/exp_command_buffer** @oneapi-src/unified-runtime-command-buffer-write
2021

2122
# Bindless Images experimental feature
2223
scripts/core/EXP-BINDLESS-IMAGES.rst @oneapi-src/unified-runtime-bindless-images-write

.github/labeler.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Config file for .github/workflows/labeler.yml to automatically add labels to
2+
# pull requests based on the globs below. For documentation see:
3+
# https://github.com/marketplace/actions/labeler
4+
---
5+
ci/cd:
6+
- changed-files:
7+
- any-glob-to-any-file:
8+
- .github/**
9+
10+
specification:
11+
- changed-files:
12+
- any-glob-to-any-file:
13+
- scripts/core/**
14+
15+
experimental:
16+
- changed-files:
17+
- any-glob-to-any-file:
18+
- scripts/core/EXP*.rst
19+
- scripts/core/exp*.yml
20+
21+
common:
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- source/common/**
25+
26+
loader:
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- source/loader/**
30+
31+
opencl:
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- source/adapter/opencl/**
35+
36+
level-zero:
37+
- changed-files:
38+
- any-glob-to-any-file:
39+
- source/adapters/level_zero/**
40+
41+
cuda:
42+
- changed-files:
43+
- any-glob-to-any-file:
44+
- source/adapters/cuda/**
45+
46+
hip:
47+
- changed-files:
48+
- any-glob-to-any-file:
49+
- source/adapters/hip/**
50+
51+
native-cpu:
52+
- changed-files:
53+
- any-glob-to-any-file:
54+
- source/adapters/native_cpu/**
55+
56+
conformance:
57+
- changed-files:
58+
- any-glob-to-any-file:
59+
- test/conformance/**
60+
61+
command-buffer:
62+
- changed-files:
63+
- any-glob-to-any-file:
64+
- scripts/core/EXP-COMMAND-BUFFER.rst
65+
- scripts/core/exp-command-buffer.yml
66+
- source/adapters/**/command_buffer.*
67+
- test/conformance/exp_command_buffer**
68+
images:
69+
- changed-files:
70+
- any-glob-to-any-file:
71+
- scripts/core/EXP-BINDLESS-IMAGES.rst
72+
- scripts/core/exp-bindless-images.yml
73+
- source/adapters/**/image.*
74+
75+
sanitizer:
76+
- changed-files:
77+
- any-glob-to-any-file:
78+
- source/loader/layers/sanitizer/*

.github/workflows/bandit.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
linux:
14+
bandit:
1515
name: Bandit
16-
runs-on: ubuntu-latest
17-
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
runs-on: ${{matrix.os}}
20+
1821
steps:
1922
- name: Clone the git repo
2023
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2124

2225
- name: Install pip packages
2326
run: pip install -r third_party/requirements.txt
2427

25-
# Scan is run only for the 'tools' folder.
28+
# Scan all files, except for dev. scripts
2629
- name: Run Bandit
27-
run: |
28-
bandit -r tools
30+
run: bandit -r . -x ./scripts/

.github/workflows/cmake.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ jobs:
158158

159159
- name: Fuzz test
160160
working-directory: ${{github.workspace}}/build
161-
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short"
161+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short" --verbose
162162

163163
adapter-build-hw:
164164
name: Build - Adapters on HW
@@ -174,6 +174,10 @@ jobs:
174174
]
175175
build_type: [Debug, Release]
176176
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]
177+
# TODO: The latest L0 loader segfaults when built with clang.
178+
exclude:
179+
- adapter: {name: L0, platform: ""}
180+
compiler: {c: clang, cxx: clang++}
177181

178182
runs-on: ${{matrix.adapter.name}}
179183

.github/workflows/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Automatically add labels to pull requests based on globs in the
2+
# .github/labeler.yml config file. For documentation see:
3+
# https://github.com/marketplace/actions/labeler
4+
---
5+
name: Pull Request Labeler
6+
7+
on: [ pull_request_target ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
labeler:
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/labeler@v5

include/ur_api.h

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ typedef enum ur_structure_type_t {
278278
UR_STRUCTURE_TYPE_EXP_FILE_DESCRIPTOR = 0x2003, ///< ::ur_exp_file_descriptor_t
279279
UR_STRUCTURE_TYPE_EXP_WIN32_HANDLE = 0x2004, ///< ::ur_exp_win32_handle_t
280280
UR_STRUCTURE_TYPE_EXP_SAMPLER_ADDR_MODES = 0x2005, ///< ::ur_exp_sampler_addr_modes_t
281+
UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES = 0x2006, ///< ::ur_exp_sampler_cubemap_properties_t
281282
/// @cond
282283
UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
283284
/// @endcond
@@ -1625,6 +1626,10 @@ typedef enum ur_device_info_t {
16251626
///< semaphore resources
16261627
UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP = 0x200F, ///< [::ur_bool_t] returns true if the device supports exporting internal
16271628
///< event resources
1629+
UR_DEVICE_INFO_CUBEMAP_SUPPORT_EXP = 0x2010, ///< [::ur_bool_t] returns true if the device supports allocating and
1630+
///< accessing cubemap resources
1631+
UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP = 0x2011, ///< [::ur_bool_t] returns true if the device supports sampling cubemapped
1632+
///< images across face boundaries
16281633
/// @cond
16291634
UR_DEVICE_INFO_FORCE_UINT32 = 0x7fffffff
16301635
/// @endcond
@@ -1650,7 +1655,7 @@ typedef enum ur_device_info_t {
16501655
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
16511656
/// + `NULL == hDevice`
16521657
/// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
1653-
/// + `::UR_DEVICE_INFO_INTEROP_SEMAPHORE_EXPORT_SUPPORT_EXP < propName`
1658+
/// + `::UR_DEVICE_INFO_CUBEMAP_SEAMLESS_FILTERING_SUPPORT_EXP < propName`
16541659
/// - ::UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION
16551660
/// + If `propName` is not supported by the adapter.
16561661
/// - ::UR_RESULT_ERROR_INVALID_SIZE
@@ -2421,13 +2426,14 @@ typedef enum ur_mem_flag_t {
24212426
///////////////////////////////////////////////////////////////////////////////
24222427
/// @brief Memory types
24232428
typedef enum ur_mem_type_t {
2424-
UR_MEM_TYPE_BUFFER = 0, ///< Buffer object
2425-
UR_MEM_TYPE_IMAGE2D = 1, ///< 2D image object
2426-
UR_MEM_TYPE_IMAGE3D = 2, ///< 3D image object
2427-
UR_MEM_TYPE_IMAGE2D_ARRAY = 3, ///< 2D image array object
2428-
UR_MEM_TYPE_IMAGE1D = 4, ///< 1D image object
2429-
UR_MEM_TYPE_IMAGE1D_ARRAY = 5, ///< 1D image array object
2430-
UR_MEM_TYPE_IMAGE1D_BUFFER = 6, ///< 1D image buffer object
2429+
UR_MEM_TYPE_BUFFER = 0, ///< Buffer object
2430+
UR_MEM_TYPE_IMAGE2D = 1, ///< 2D image object
2431+
UR_MEM_TYPE_IMAGE3D = 2, ///< 3D image object
2432+
UR_MEM_TYPE_IMAGE2D_ARRAY = 3, ///< 2D image array object
2433+
UR_MEM_TYPE_IMAGE1D = 4, ///< 1D image object
2434+
UR_MEM_TYPE_IMAGE1D_ARRAY = 5, ///< 1D image array object
2435+
UR_MEM_TYPE_IMAGE1D_BUFFER = 6, ///< 1D image buffer object
2436+
UR_MEM_TYPE_IMAGE_CUBEMAP_EXP = 0x2000, ///< Experimental cubemap image object
24312437
/// @cond
24322438
UR_MEM_TYPE_FORCE_UINT32 = 0x7fffffff
24332439
/// @endcond
@@ -7241,6 +7247,17 @@ typedef enum ur_exp_image_copy_flag_t {
72417247
/// @brief Bit Mask for validating ur_exp_image_copy_flags_t
72427248
#define UR_EXP_IMAGE_COPY_FLAGS_MASK 0xfffffff8
72437249

7250+
///////////////////////////////////////////////////////////////////////////////
7251+
/// @brief Sampler cubemap seamless filtering mode.
7252+
typedef enum ur_exp_sampler_cubemap_filter_mode_t {
7253+
UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_DISJOINTED = 0, ///< Disable seamless filtering
7254+
UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS = 1, ///< Enable Seamless filtering
7255+
/// @cond
7256+
UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_FORCE_UINT32 = 0x7fffffff
7257+
/// @endcond
7258+
7259+
} ur_exp_sampler_cubemap_filter_mode_t;
7260+
72447261
///////////////////////////////////////////////////////////////////////////////
72457262
/// @brief File descriptor
72467263
typedef struct ur_exp_file_descriptor_t {
@@ -7295,6 +7312,21 @@ typedef struct ur_exp_sampler_addr_modes_t {
72957312

72967313
} ur_exp_sampler_addr_modes_t;
72977314

7315+
///////////////////////////////////////////////////////////////////////////////
7316+
/// @brief Describes cubemap sampler properties
7317+
///
7318+
/// @details
7319+
/// - Specify these properties in ::urSamplerCreate via ::ur_sampler_desc_t
7320+
/// as part of a `pNext` chain.
7321+
typedef struct ur_exp_sampler_cubemap_properties_t {
7322+
ur_structure_type_t stype; ///< [in] type of this structure, must be
7323+
///< ::UR_STRUCTURE_TYPE_EXP_SAMPLER_CUBEMAP_PROPERTIES
7324+
void *pNext; ///< [in,out][optional] pointer to extension-specific structure
7325+
ur_exp_sampler_cubemap_filter_mode_t cubemapFilterMode; ///< [in] enables or disables seamless cubemap filtering between cubemap
7326+
///< faces
7327+
7328+
} ur_exp_sampler_cubemap_properties_t;
7329+
72987330
///////////////////////////////////////////////////////////////////////////////
72997331
/// @brief Describes an interop memory resource descriptor
73007332
typedef struct ur_exp_interop_mem_desc_t {

include/ur_print.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintUsmMigrationFlags(enum ur_usm_migrati
882882
/// - `buff_size < out_size`
883883
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpImageCopyFlags(enum ur_exp_image_copy_flag_t value, char *buffer, const size_t buff_size, size_t *out_size);
884884

885+
///////////////////////////////////////////////////////////////////////////////
886+
/// @brief Print ur_exp_sampler_cubemap_filter_mode_t enum
887+
/// @returns
888+
/// - ::UR_RESULT_SUCCESS
889+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
890+
/// - `buff_size < out_size`
891+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapFilterMode(enum ur_exp_sampler_cubemap_filter_mode_t value, char *buffer, const size_t buff_size, size_t *out_size);
892+
885893
///////////////////////////////////////////////////////////////////////////////
886894
/// @brief Print ur_exp_file_descriptor_t struct
887895
/// @returns
@@ -914,6 +922,14 @@ UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerMipProperties(const struct
914922
/// - `buff_size < out_size`
915923
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerAddrModes(const struct ur_exp_sampler_addr_modes_t params, char *buffer, const size_t buff_size, size_t *out_size);
916924

925+
///////////////////////////////////////////////////////////////////////////////
926+
/// @brief Print ur_exp_sampler_cubemap_properties_t struct
927+
/// @returns
928+
/// - ::UR_RESULT_SUCCESS
929+
/// - ::UR_RESULT_ERROR_INVALID_SIZE
930+
/// - `buff_size < out_size`
931+
UR_APIEXPORT ur_result_t UR_APICALL urPrintExpSamplerCubemapProperties(const struct ur_exp_sampler_cubemap_properties_t params, char *buffer, const size_t buff_size, size_t *out_size);
932+
917933
///////////////////////////////////////////////////////////////////////////////
918934
/// @brief Print ur_exp_interop_mem_desc_t struct
919935
/// @returns

0 commit comments

Comments
 (0)