Skip to content

Commit e29448c

Browse files
authored
Merge branch 'main' into martin/parameteriseEnqueueMemBufferTests
2 parents 6a44b93 + ed949ec commit e29448c

File tree

8 files changed

+71
-161
lines changed

8 files changed

+71
-161
lines changed

.github/workflows/cmake.yml

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -115,51 +115,50 @@ jobs:
115115
working-directory: ${{github.workspace}}/build
116116
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
117117

118-
# Disable short fuzz tests until the ubuntu-22.04 runner is fixed
119-
# fuzztest-build:
120-
# name: Build and run quick fuzztest scenarios
121-
# strategy:
122-
# matrix:
123-
# build_type: [Debug, Release]
124-
# compiler: [{c: clang, cxx: clang++}]
125-
126-
# runs-on: 'ubuntu-22.04'
127-
128-
# steps:
129-
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
130-
131-
# - name: Install pip packages
132-
# run: pip install -r third_party/requirements.txt
133-
134-
# - name: Download DPC++
135-
# run: |
136-
# sudo apt install libncurses5
137-
# wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
138-
# tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
139-
140-
# - name: Setup DPC++
141-
# run: |
142-
# source ${{github.workspace}}/dpcpp_compiler/startup.sh
143-
144-
# - name: Configure CMake
145-
# run: >
146-
# cmake
147-
# -B${{github.workspace}}/build
148-
# -DCMAKE_C_COMPILER=${{matrix.compiler.c}}
149-
# -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
150-
# -DUR_ENABLE_TRACING=ON
151-
# -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
152-
# -DUR_BUILD_TESTS=ON
153-
# -DUR_USE_ASAN=ON
154-
# -DUR_USE_UBSAN=ON
155-
# -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
156-
157-
# - name: Build
158-
# run: cmake --build ${{github.workspace}}/build -j $(nproc)
159-
160-
# - name: Fuzz test
161-
# working-directory: ${{github.workspace}}/build
162-
# run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short"
118+
fuzztest-build:
119+
name: Build and run quick fuzztest scenarios
120+
strategy:
121+
matrix:
122+
build_type: [Debug, Release]
123+
compiler: [{c: clang, cxx: clang++}]
124+
125+
runs-on: 'ubuntu-22.04'
126+
127+
steps:
128+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
129+
130+
- name: Install pip packages
131+
run: pip install -r third_party/requirements.txt
132+
133+
- name: Download DPC++
134+
run: |
135+
sudo apt install libncurses5
136+
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
137+
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
138+
139+
- name: Setup DPC++
140+
run: |
141+
source ${{github.workspace}}/dpcpp_compiler/startup.sh
142+
143+
- name: Configure CMake
144+
run: >
145+
cmake
146+
-B${{github.workspace}}/build
147+
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
148+
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
149+
-DUR_ENABLE_TRACING=ON
150+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
151+
-DUR_BUILD_TESTS=ON
152+
-DUR_USE_ASAN=ON
153+
-DUR_USE_UBSAN=ON
154+
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
155+
156+
- name: Build
157+
run: cmake --build ${{github.workspace}}/build -j $(nproc)
158+
159+
- name: Fuzz test
160+
working-directory: ${{github.workspace}}/build
161+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-short"
163162

164163
adapter-build-hw:
165164
name: Build - Adapters on HW

.github/workflows/coverage.yml

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

.github/workflows/nightly.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
4949
cmake --build ${{github.workspace}}/build -j $(nproc)
5050
51-
# Disable long fuzz tests until the ubuntu-22.04 runner is fixed
52-
# - name: Fuzz long test
53-
# working-directory: ${{github.workspace}}/build
54-
# run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-long"
51+
- name: Fuzz long test
52+
working-directory: ${{github.workspace}}/build
53+
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "fuzz-long"

.github/workflows/scorecard.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
# This workflow uses actions that are not certified by GitHub. They are provided
2-
# by a third-party and are governed by separate terms of service, privacy
3-
# policy, and support documentation.
4-
1+
# Scorecard analysis, looking for vulnerabilities and bad practices in the repo.
52
name: Scorecard supply-chain security
63
on:
74
# For Branch-Protection check. Only the default branch is supported. See
85
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
96
branch_protection_rule:
10-
# To guarantee Maintained check is occasionally updated. See
11-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
127
workflow_dispatch:
138
schedule:
9+
# Runs at 22:45 UTC on Thursday.
1410
- cron: '45 22 * * 4'
1511
push:
1612
branches: [ "main" ]
@@ -27,9 +23,6 @@ jobs:
2723
security-events: write
2824
# Needed to publish results and get a badge (see publish_results below).
2925
id-token: write
30-
# Uncomment the permissions below if installing in a private repository.
31-
# contents: read
32-
# actions: read
3326

3427
steps:
3528
- name: "Checkout code"
@@ -38,36 +31,30 @@ jobs:
3831
persist-credentials: false
3932

4033
- name: "Run analysis"
41-
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
34+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
4235
with:
43-
results_file: results.sarif
36+
results_file: scorecard_results.sarif
4437
results_format: sarif
4538
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
4639
# - you want to enable the Branch-Protection check on a *public* repository, or
4740
# - you are installing Scorecard on a *private* repository
4841
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
4942
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
5043

51-
# Public repositories:
52-
# - Publish results to OpenSSF REST API for easy access by consumers
53-
# - Allows the repository to include the Scorecard badge.
54-
# - See https://github.com/ossf/scorecard-action#publishing-results.
55-
# For private repositories:
56-
# - `publish_results` will always be set to `false`, regardless
57-
# of the value entered here.
44+
# Publish results to OpenSSF REST API for easy access by consumers
45+
# Allows the repository to include the Scorecard badge.
46+
# See https://github.com/ossf/scorecard-action#publishing-results.
5847
publish_results: true
5948

60-
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
61-
# format to the repository Actions tab.
6249
- name: "Upload artifact"
63-
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
50+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 4.3.1
6451
with:
65-
name: SARIF file
66-
path: results.sarif
52+
name: Scorecard results
53+
path: scorecard_results.sarif
6754
retention-days: 5
6855

6956
# Upload the results to GitHub's code scanning dashboard.
7057
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
58+
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
7259
with:
73-
sarif_file: results.sarif
60+
sarif_file: scorecard_results.sarif

source/adapters/level_zero/command_buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
10301030
UR_ASSERT(Command, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
10311031
UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE);
10321032
UR_ASSERT(CommandDesc, UR_RESULT_ERROR_INVALID_NULL_POINTER);
1033-
UR_ASSERT(CommandDesc->newWorkDim >= 0 && CommandDesc->newWorkDim <= 3,
1033+
UR_ASSERT(CommandDesc->newWorkDim <= 3,
10341034
UR_RESULT_ERROR_INVALID_WORK_DIMENSION);
10351035

10361036
// Lock command, kernel and command buffer for update.

source/adapters/level_zero/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ bool ur_device_handle_t_::useDriverInOrderLists() {
10741074
static const bool UseDriverInOrderLists = [] {
10751075
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
10761076
if (!UrRet)
1077-
return false;
1077+
return true;
10781078
return std::atoi(UrRet) != 0;
10791079
}();
10801080

source/adapters/level_zero/event.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,15 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
13071307
}
13081308
}
13091309

1310+
ur_command_list_ptr_t CommandList;
1311+
if (Queue && Queue->Device != CurQueue->Device) {
1312+
// Get a command list prior to acquiring an event lock.
1313+
// This prevents a potential deadlock with recursive
1314+
// event locks.
1315+
UR_CALL(Queue->Context->getAvailableCommandList(Queue, CommandList,
1316+
false, true));
1317+
}
1318+
13101319
std::shared_lock<ur_shared_mutex> Lock(EventList[I]->Mutex);
13111320

13121321
if (Queue && Queue->Device != CurQueue->Device &&
@@ -1316,10 +1325,6 @@ ur_result_t _ur_ze_event_list_t::createAndRetainUrZeEventList(
13161325
bool IsInternal = true;
13171326
bool IsMultiDevice = true;
13181327

1319-
ur_command_list_ptr_t CommandList{};
1320-
UR_CALL(Queue->Context->getAvailableCommandList(Queue, CommandList,
1321-
false, true));
1322-
13231328
UR_CALL(createEventAndAssociateQueue(
13241329
Queue, &MultiDeviceEvent, EventList[I]->CommandType, CommandList,
13251330
IsInternal, IsMultiDevice));

tools/urtrace/urtrace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_dynamic_library_name(name):
6363
config = vars(args)
6464
if args.debug:
6565
print(config)
66-
env = dict()
66+
env = os.environ.copy()
6767

6868
collector_args = ""
6969
if args.print_begin:

0 commit comments

Comments
 (0)