Skip to content

Commit 8f15a87

Browse files
committed
Merge branch 'main' into config-red-zone-size
2 parents 3ea40fa + 0b302e6 commit 8f15a87

File tree

16 files changed

+407
-98
lines changed

16 files changed

+407
-98
lines changed

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ RUN /opt/install_dpcpp.sh
6767
COPY install_libbacktrace.sh /opt/install_libbacktrace.sh
6868
RUN /opt/install_libbacktrace.sh
6969

70-
# Add a new (non-root) 'user'
71-
ENV USER user
70+
# Add a new (non-root) 'test_user' and switch to it
71+
ENV USER test_user
7272
ENV USERPASS pass
7373
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"
74+
USER test_user

.github/scripts/get_system_info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function system_info {
5353
echo "**********/proc/meminfo**********"
5454
cat /proc/meminfo
5555
echo "**********build/bin/urinfo**********"
56-
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo || true
56+
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo --no-linear-ids --verbose || true
5757
echo "******OpenCL*******"
5858
# The driver version of OpenCL Graphics is the compute-runtime version
5959
clinfo || echo "OpenCL not installed"

.github/workflows/hadolint.yml

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

.github/workflows/trivy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Runs linter for Docker files
2+
name: Trivy
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
pull_request:
8+
paths:
9+
- '.github/docker/*Dockerfile'
10+
- '.github/workflows/trivy.yml'
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
linux:
21+
name: Trivy
22+
runs-on: ubuntu-latest
23+
permissions:
24+
security-events: write
25+
26+
steps:
27+
- name: Clone repo
28+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
29+
30+
- name: Run Trivy
31+
uses: aquasecurity/trivy-action@84384bd6e777ef152729993b8145ea352e9dd3ef # v0.17.0
32+
with:
33+
scan-type: 'config'
34+
hide-progress: false
35+
format: 'sarif'
36+
output: 'trivy-results.sarif'
37+
exit-code: 1 # Fail if issue found
38+
# file with suppressions: .trivyignore (in root dir)
39+
40+
- name: Print report and trivyignore file
41+
run: |
42+
echo "### Trivy ignore content:"
43+
cat .trivyignore
44+
echo "### Trivy report:"
45+
cat trivy-results.sarif
46+
47+
- name: Upload results
48+
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0
49+
with:
50+
sarif_file: 'trivy-results.sarif'

.trivyignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Docs: https://aquasecurity.github.io/trivy/latest/docs/configuration/filtering/#trivyignore
2+
3+
# In docker files:
4+
# HEALTHCHECK is not required for development, nor in CI (failed docker = failed CI).
5+
# We're not hosting any application with usage of the dockers.
6+
AVD-DS-0026

source/adapters/level_zero/context.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,11 @@ ur_result_t ur_context_handle_t_::getAvailableCommandList(
679679
if (Queue->hasOpenCommandList(UseCopyEngine)) {
680680
if (AllowBatching) {
681681
bool batchingAllowed = true;
682+
if (ForcedCmdQueue &&
683+
CommandBatch.OpenCommandList->second.ZeQueue != *ForcedCmdQueue) {
684+
// Current open batch doesn't match the forced command queue
685+
batchingAllowed = false;
686+
}
682687
if (!UrL0OutOfOrderIntegratedSignalEvent &&
683688
Queue->Device->isIntegrated()) {
684689
batchingAllowed = eventCanBeBatched(Queue, UseCopyEngine,

source/adapters/level_zero/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ bool ur_device_handle_t_::useDriverInOrderLists() {
10851085
static const bool UseDriverInOrderLists = [] {
10861086
const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS");
10871087
if (!UrRet)
1088-
return true;
1088+
return false;
10891089
return std::atoi(UrRet) != 0;
10901090
}();
10911091

source/adapters/level_zero/event.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,16 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueEventsWaitWithBarrier(
368368
}
369369

370370
// Execute each command list so the barriers can be encountered.
371-
for (ur_command_list_ptr_t &CmdList : CmdLists)
371+
for (ur_command_list_ptr_t &CmdList : CmdLists) {
372+
bool IsCopy =
373+
CmdList->second.isCopy(reinterpret_cast<ur_queue_handle_t>(Queue));
374+
const auto &CommandBatch =
375+
(IsCopy) ? Queue->CopyCommandBatch : Queue->ComputeCommandBatch;
376+
// Only batch if the matching CmdList is already open.
377+
OkToBatch = CommandBatch.OpenCommandList == CmdList;
378+
372379
UR_CALL(Queue->executeCommandList(CmdList, false, OkToBatch));
380+
}
373381

374382
UR_CALL(Queue->ActiveBarriers.clear());
375383
auto UREvent = reinterpret_cast<ur_event_handle_t>(*Event);

source/adapters/opencl/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
507507
cl_adapter::cast<cl_device_id>(hDevice), {"cl_khr_fp16"}, Supported));
508508

509509
if (!Supported) {
510-
return UR_RESULT_ERROR_INVALID_ENUMERATION;
510+
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
511511
}
512512
}
513513

source/common/ur_util.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ template <typename T> struct stype_map {};
294294
// stype_map_impl<UR_STRUCTURE_TYPE_USM_DEVICE_DESC> {};
295295
#include "stype_map_helpers.def"
296296

297-
template <typename T> constexpr int as_stype() { return stype_map<T>::value; };
297+
template <typename T> constexpr int as_stype() { return stype_map<T>::value; }
298298

299299
/// Walk a generic UR linked list looking for a node of the given type. If it's
300300
/// found, its address is returned, othewise `nullptr`. e.g. to find out whether

0 commit comments

Comments
 (0)