Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAPTERS] update to latest from sycl #759

Merged
merged 178 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
6a8acc4
[UR] Clarify UNINITIALIZED error meaning
Jun 23, 2023
e1de661
[UR] Add exp-feat docs to rst template
Jun 23, 2023
3328f87
[UR][CTS] Add urMemImageGetInfo tests and add missing return values t…
callumfare Jun 23, 2023
52c98d0
Merge pull request #646 from veselypeta/petr/update-enum-docs
veselypeta Jun 26, 2023
39b3546
Merge pull request #649 from callumfare/callum/cts-memImageGetInfo
callumfare Jun 26, 2023
95a5fb4
[UR][CTS] Fix urKernelSetArgPointer tests
callumfare Jun 26, 2023
15a2da0
[UR] Device CTS fixes
veselypeta Jun 26, 2023
52d05bf
Merge pull request #652 from veselypeta/petr/cts-fixes
veselypeta Jun 26, 2023
df3949e
Merge pull request #651 from callumfare/callum/cts-fix-kernelsetargpo…
callumfare Jun 27, 2023
6f940e3
[Exp][Bindless Images] Add BI revision 4 functionality
przemektmalon Jun 27, 2023
4a9ea17
[UR] Install DPCXX
Jun 27, 2023
78aebac
Merge pull request #655 from przemektmalon/przemek/bindless-revision-4
veselypeta Jun 27, 2023
fa8ec81
[uma] Improve reporting of pool/provider specific errors
igchor Jun 20, 2023
438c0d3
[uma] Improve error reporing int DisjointPool
igchor Jun 20, 2023
21b15da
[UR] Setup Virtual Memory CTS template
Jun 28, 2023
ec72d28
Merge pull request #656 from veselypeta/petr/virtual-memory-cts-tempalte
veselypeta Jun 28, 2023
95bfbeb
[UR][CTS] Adds CTS coverage for urVirtualMemGranularityGetInfo
Jun 28, 2023
599942a
[uma] simplify get_name
igchor Jun 20, 2023
6f0df6c
[uma] add umaGetLastFailedMemoryProvider
igchor Jun 28, 2023
26099b3
Merge pull request #654 from veselypeta/petr/install-dpcxx
veselypeta Jun 29, 2023
806fcfd
Merge pull request #657 from veselypeta/petr/590/urVirtualMemGranular…
veselypeta Jun 29, 2023
f5a7881
[UR][CTS] Add urEnqueueMemImageRead/Write tests
callumfare Jun 29, 2023
3f89f04
Merge pull request #640 from igchor/uma_error
pbalcer Jun 29, 2023
7e5059c
Merge pull request #659 from callumfare/callum/cts-enqueue-image-read…
callumfare Jun 29, 2023
dde7199
[uma] rename uma to umf
igchor Jun 29, 2023
b03c58f
Fix adapter registry test CMake
npmiller Jun 29, 2023
a632ba3
Merge pull request #661 from igchor/umf_rename
pbalcer Jun 30, 2023
855504b
Merge pull request #662 from npmiller/fix-cmake
pbalcer Jun 30, 2023
458f62f
[UR] Support multi-line functions in rst files
Jun 27, 2023
78641e7
[UR] Catch iterator exception
Jun 30, 2023
886c47d
[UR] Correct typos in Virtual Memory
Jun 29, 2023
1856b51
[UR][CTS] Add tests for PhysicalMem entry-points
Jun 29, 2023
4ab283a
[UR] Add invalid size check to virtual memory
Jun 29, 2023
046aa47
[UR][CTS] Add invalid size test to urPhysicalMemCreate
Jun 29, 2023
71c3fc5
[UR] Remove newline after struct decl
Jun 30, 2023
96c17d3
Merge pull request #658 from veselypeta/petr/590/urPhysicalMemCreate
veselypeta Jun 30, 2023
9081a1e
Merge pull request #653 from veselypeta/petr/608/support-validation-o…
veselypeta Jun 30, 2023
8119585
[UR][UMF] Fix warning from -Wstrict-prototypes
Jun 30, 2023
68c1f3c
[UR] Fix code-block documentation rendering
Jul 3, 2023
e6b3865
Merge pull request #664 from veselypeta/petr/umf-strict-prototypes-fix
pbalcer Jul 3, 2023
25abfe6
Merge pull request #666 from veselypeta/petr/665/fix-doc-rendering
veselypeta Jul 3, 2023
c9faea7
[UR] Test remaining Virtual Memory entry-points
Jun 30, 2023
2eae79a
Merge pull request #663 from veselypeta/petr/590/remaining-virtual-mem
veselypeta Jul 3, 2023
412c658
[UR] Render macros in API Listing
Jul 4, 2023
f6f80b8
[UR] Remove duplicate macro defs
Jul 4, 2023
f4cea52
[UR] Add typedefs to API listings
Jul 4, 2023
f91aa04
Update sycl/xpti version
wlemkows Jul 4, 2023
a8cd88a
[UR] Fix spelling
Jul 4, 2023
ac100b9
Merge pull request #677 from veselypeta/petr/592/add-macros-to-api-li…
veselypeta Jul 4, 2023
558a2e5
[UR][CTS] Add tests for urEnqueueMemImageCopy
callumfare Jul 3, 2023
22a7acb
Merge pull request #679 from wlemkows/update-xpti-ver
pbalcer Jul 4, 2023
27eb9ae
[UR][CTS] Add tests for urPlatformGetApiVersion
callumfare Jul 4, 2023
50a2881
Merge pull request #668 from callumfare/callum/cts-imagecopy
callumfare Jul 4, 2023
478f864
[UR] Automatically generate ur_structure_type_t
Jul 3, 2023
bd76766
[UR] Integrate registry.yml
Jul 3, 2023
2f73f77
[UR] Generate structure type along with function type
Jul 4, 2023
eebffa7
Merge pull request #678 from veselypeta/petr/fix-spelling
veselypeta Jul 4, 2023
be12f15
[ur] Sort experimental feature toctree order
kbenzie Jul 4, 2023
54ce162
[UR][CTS] Add CTS tests for urPlatformGetLastError
callumfare Jul 4, 2023
d520e24
Add the cuda adapter to the list of known adapter libraries.
aarongreig Jul 4, 2023
4cdbbd8
Merge pull request #680 from callumfare/callum/cts-urPlatformGetLastE…
callumfare Jul 4, 2023
9595961
Merge pull request #683 from callumfare/callum/cts-urPlatformGetApiVe…
callumfare Jul 4, 2023
fbb9b18
Fix random spelling issues
lukaszstolarczuk Jun 22, 2023
b495e39
[UR] fix api listing heading title
Jul 5, 2023
22c39d1
Merge pull request #687 from aarongreig/aaron/addCudaToKnownAdapters
pbalcer Jul 5, 2023
08f7031
Merge pull request #686 from lukaszstolarczuk/fix-spellings
pbalcer Jul 5, 2023
da4335b
Merge pull request #682 from kbenzie/benie/exp-rst-order
pbalcer Jul 5, 2023
b6109c8
Merge pull request #670 from veselypeta/petr/563/structure_type
pbalcer Jul 5, 2023
3fc357c
Add UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT to
isaacault Jul 5, 2023
c9ed0ca
Add _EXP
isaacault Jul 5, 2023
5372d3b
[UR][CTS] Add tests for urPlatformGetNaitiveHandle and urPlatformCrea…
callumfare Jul 4, 2023
a096f11
Fix enumeration typo
isaacault Jul 5, 2023
bee9f64
Merge pull request #684 from callumfare/callum/cts-urPlatformNativeHa…
callumfare Jul 5, 2023
d367c68
[UR] Revamp README file a little
lukaszstolarczuk Jul 4, 2023
f72f449
Merge pull request #685 from lukaszstolarczuk/revamp-readme
pbalcer Jul 5, 2023
9744b25
Update changelog.
isaacault Jul 5, 2023
2f1df3f
[UR][CTS] Add tests for urEnqueueDeviceGlobalRead/Write
Jul 4, 2023
8a3f07a
Merge pull request #689 from isaacault/iault/bi_shared_usm_support
kbenzie Jul 6, 2023
bdcdc49
Merge pull request #690 from veselypeta/petr/676/urEnqueueDeviceGloba…
veselypeta Jul 6, 2023
ae2c403
Correct size of UR_DEVICE_INFO_MEMORY_BUS_WIDTH in CTS test.
aarongreig Jul 6, 2023
fd6ce4c
Merge pull request #695 from aarongreig/aaron/memBusWidthTestFix
aarongreig Jul 6, 2023
07b7633
[umf] create/destroy memory tracker in lib ctor/dtor
igchor Jul 5, 2023
a4bf2a5
Merge pull request #693 from igchor/memory_tracker_dtor
pbalcer Jul 7, 2023
4af97e7
[UR] Allow compilation on apple
veselypeta May 19, 2023
70459f4
[UR] Add simple macos action
Jul 7, 2023
8653be6
[ur] macOS fix dylib version & enable color diagnostics
kbenzie Mar 16, 2023
e29d495
Add coverity badge to README
pbalcer Jul 10, 2023
0ae3b04
Merge pull request #700 from oneapi-src/pbalcer-coverity-badge
wlemkows Jul 10, 2023
460713e
Merge pull request #697 from veselypeta/petr/support-apple
veselypeta Jul 10, 2023
90e8de4
Add missing include to umf/memory_pool_ops.h
vinser52 Jul 10, 2023
db40d34
Merge pull request #702 from vinser52/fix_umf_includes
igchor Jul 10, 2023
6653648
[umf] add extra poolMakeUnique overload to helpers
igchor Jul 7, 2023
2743832
[UR] print unions correctly in ur_params
Jul 7, 2023
7d22d0a
[UR] Address review comments for union serialize
Jul 10, 2023
a454183
[UR] Use 'line' to print union members
Jul 10, 2023
cb554c2
[UR] add verification checks for tags
Jul 10, 2023
d66a850
[UR] Remove extra whitespace from template
Jul 11, 2023
0d992a0
Merge pull request #696 from veselypeta/petr/538/handle-unions
veselypeta Jul 11, 2023
64a847b
Add strongly recommended security compiler flags
wlemkows Jun 29, 2023
f0132d1
add handling unsupported functions for disjoint pool
Jul 11, 2023
566169d
Merge pull request #698 from igchor/umf_helpers_provider
igchor Jul 12, 2023
efee787
Merge pull request #660 from wlemkows/add-compiler-flags
pbalcer Jul 13, 2023
1000c26
[UR] Added Native CPU adapter constants
Alcpz Jul 13, 2023
0033c6e
Set global compile flags for UR targets only
PatKamin Jul 12, 2023
4e22bd7
[UR] Fixed extra newline introduced in generated code
Alcpz Jul 13, 2023
d808cab
Merge pull request #701 from PatKamin/wrap-ur-targets
pbalcer Jul 13, 2023
0189058
Merge pull request #712 from Alcpz/alcpz/native_cpu_constants
veselypeta Jul 13, 2023
57d6895
[umf] add error translation function to helpers
kswiecicki Jul 12, 2023
2966d01
Merge pull request #688 from veselypeta/petr/fix-heading
veselypeta Jul 13, 2023
fc50494
[Bindless][Exp] Add bindless images interop resource handles
przemektmalon Jul 13, 2023
50e8eb0
Merge pull request #709 from kswiecicki/umf2ur-err
igchor Jul 13, 2023
46e2cfd
Merge pull request #710 from DamianDuy/addUnsupportedFunctionsHandling
igchor Jul 13, 2023
9b5b8b9
Merge pull request #716 from przemektmalon/przemek/bindless-images-in…
veselypeta Jul 13, 2023
5aff944
[umf] return umf_result_t from umfPoolFree
igchor Jul 13, 2023
e46f3fb
[Bindless][Exp] Update struct and param naming style to adhere to con…
przemektmalon Jul 14, 2023
bc0b581
Merge pull request #718 from przemektmalon/przemek/fix-interop-struct…
veselypeta Jul 14, 2023
1b13824
[Bindless][Exp] Fix semaphore import function parameter name
przemektmalon Jul 14, 2023
3c6f02c
Merge pull request #719 from przemektmalon/przemek/fix-semaphore-impo…
veselypeta Jul 14, 2023
dd0a598
[UR] Add nocheck to native handle types
Jul 14, 2023
3f7f99c
Merge pull request #720 from veselypeta/petr/add-nocheck-to-native-ha…
veselypeta Jul 14, 2023
744e549
Implement loader config object, allow programatic layer management.
aarongreig Jun 30, 2023
9f95dec
Merge pull request #717 from igchor/umf_free
pbalcer Jul 17, 2023
c46db28
[ur] Update CTS to match native handle nocheck
kbenzie Jul 17, 2023
7162e22
Address feedback: comment, atomic ref count, better env helper
aarongreig Jul 17, 2023
f8d6182
Address feedback: rethink layer::isEnabled
aarongreig Jul 17, 2023
ba27e7d
Merge pull request #723 from kbenzie/benie/cts-nocheck-native-events
kbenzie Jul 18, 2023
13805cc
Fix GetEnvironmentVariable encoding
kswiecicki Jul 18, 2023
7e1c90b
Address feedback: CTS environment error handling.
aarongreig Jul 18, 2023
0ab0aa3
Merge pull request #726 from kswiecicki/env-var-encoding-win
igchor Jul 18, 2023
e002ca8
Merge pull request #681 from aarongreig/aaron/layerConfig
aarongreig Jul 18, 2023
5ec5bd4
Enable validation on conformance tests for platform.
aarongreig Jul 18, 2023
b3ea52c
[coverity] Fix 1566349 Resource leak
kbenzie Jul 18, 2023
19fdd60
[coverity] Fix 1566348 Uninitialized scalar field
kbenzie Jul 18, 2023
38141b3
[coverity] Fix 1566349 Resource leak
kbenzie Jul 18, 2023
9773a79
Merge pull request #730 from kbenzie/benie/fix-coverity-18-07-2023
wlemkows Jul 18, 2023
e8e96ce
Merge pull request #729 from aarongreig/aaron/fixPlatformConformanceT…
aarongreig Jul 19, 2023
b279985
Implement adapter instance handles
callumfare Jul 11, 2023
974a7d6
Merge pull request #715 from callumfare/callum/adapter_handle
callumfare Jul 19, 2023
475b3c6
[ur] Fix leak validation test fixture
kbenzie Jul 19, 2023
7cfd6e8
Merge pull request #732 from kbenzie/benie/fix-windows-leak-layer-tes…
kbenzie Jul 19, 2023
5230505
[coverity] Fix 1566353 Resource leak
kbenzie Jul 19, 2023
656361b
[coverity] Fix 1566354 Resource leak
kbenzie Jul 19, 2023
36329b7
Merge pull request #733 from kbenzie/benie/fix-coverity-19-07-23
kbenzie Jul 19, 2023
c1ee9f3
[ur] Allow native handles to be unsupported
kbenzie Jul 17, 2023
a00e9ba
Merge pull request #724 from kbenzie/benie/unsupported-native-handles
kbenzie Jul 19, 2023
9bd058a
[ur] Match null DDI table entry error code
kbenzie Jul 20, 2023
9fc7398
Merge pull request #735 from kbenzie/benie/val-return-uninitialized-o…
kbenzie Jul 20, 2023
2ed0d34
[ur] Fix urPlatformGetNativeHandle test
kbenzie Jul 20, 2023
c12d602
Merge pull request #736 from kbenzie/benie/cts-fix-platform-get-nativ…
kbenzie Jul 20, 2023
f5fbb5e
[ur] Add missing virtual memory support query
kbenzie Jul 20, 2023
2620159
Merge pull request #737 from kbenzie/benie/device-virtual-memory-supp…
kbenzie Jul 21, 2023
8ed1cee
Cosmetic changes in UMF
vinser52 Jul 24, 2023
d3fa9ca
Merge pull request #742 from vinser52/umf_cosmetic_fixes
igchor Jul 24, 2023
788e8af
Correct ur_usm_desc_t initialization in USM alloc conformance tests.
aarongreig Jul 24, 2023
1fb8a21
[umf] fix the last remaining coverity issue
pbalcer Jul 25, 2023
cb0047e
Merge pull request #743 from aarongreig/aaron/correctUsmDescInit
aarongreig Jul 25, 2023
a1ec340
[UMA] add more tests for allocations
May 23, 2023
95a5ab3
Fix shadowing in USM pool test fixture, correct assertion in PoolReta…
aarongreig Jul 25, 2023
0169603
Merge pull request #535 from DamianDuy/addAllocationUMAtests
igchor Jul 25, 2023
2ffcda3
Merge pull request #745 from pbalcer/fix-cov
igchor Jul 25, 2023
f09ed03
[umf] Make pool tracking optional
kswiecicki Jul 24, 2023
ff705f5
Enable UMF pool tracking in github workflows
kswiecicki Jul 24, 2023
6ae608c
Merge pull request #741 from kswiecicki/opt-pool-tracking-2
pbalcer Jul 26, 2023
ae807d8
Merge pull request #746 from aarongreig/aaron/poolTestFixes
pbalcer Jul 26, 2023
3621fbe
Add ThreadSanitizer option
wlemkows Jul 25, 2023
30a9cb3
[umf] fix erors reported by ASAN
igchor Jul 26, 2023
2826341
Merge pull request #747 from wlemkows/ur-thread-sanitizer
pbalcer Jul 26, 2023
e73389f
Merge pull request #749 from igchor/fix_leaks
igchor Jul 26, 2023
53c8cb4
[umf] use alloc sizes that are multiples of 8
igchor Jul 27, 2023
d8922f8
Add first Docker image recipe
lukaszstolarczuk Jul 11, 2023
8e9f3ff
Merge pull request #750 from igchor/fix_alloc_sizes
igchor Jul 27, 2023
333cfc2
Merge pull request #734 from lukaszstolarczuk/add-docker-image
pbalcer Jul 28, 2023
6bb7b9d
Add security compiler and linker flags
wlemkows Jul 31, 2023
5b4c3d2
Merge pull request #754 from wlemkows/ur-add-sec-flags
pbalcer Jul 31, 2023
be77877
[ur] fix ctad-maybe-unsupported warning
igchor Jul 31, 2023
5513ee2
Merge pull request #757 from igchor/ctad-maybe-unsupported
igchor Jul 31, 2023
99ac337
Merge commit '5513ee2f96c4a56b0ae1c1de307505b2f83984ca' into adapters
pbalcer Aug 1, 2023
759e753
[ADAPTERS] update to latest from sycl
pbalcer Aug 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Content

Dockerfiles and scripts placed in this directory are intended to be used as
development process vehicles and part of continuous integration process.

Images built out of those recipes may be used with Docker or podman as
development environment.

# How to build docker image

To build docker image on local machine execute:

```sh
docker build -t ur:ubuntu-22.04 -f ./ubuntu-22.04.Dockerfile .
```

To set any build time variable (e.g., an optional ARG from docker recipe), add to the command (after `build`), e.g.:

```sh
--build-arg SKIP_DPCPP_BUILD=1
```

One other example of using these extra build arguments are proxy settings. They are required for accessing network
(e.g., to download dependencies within docker), if a host is using a proxy server. Example usage:

```sh
--build-arg https_proxy=http://proxy.com:port --build-arg http_proxy=http://proxy.com:port
```

# How to use docker image

To run docker container (using the previously built image) execute:

```sh
docker run --shm-size=4G -v /your/workspace/path/:/opt/workspace:z -w /opt/workspace/ -it ur:ubuntu-22.04 /bin/bash
```

To set (or override) any docker environment variable, add to the command (after `run`):

```sh
-e ENV_VARIABLE=VALUE
```
23 changes: 23 additions & 0 deletions .github/docker/install_dpcpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Copyright (C) 2023 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# install_dpcpp.sh - unpacks DPC++ in ${DPCPP_PATH}, to be used while building UR
#

set -e

if [ "${SKIP_DPCPP_BUILD}" ]; then
echo "Variable 'SKIP_DPCPP_BUILD' is set; skipping building DPC++"
exit
fi

apt-get install -y --no-install-recommends \
libncurses5

mkdir -p ${DPCPP_PATH}
wget -O ${DPCPP_PATH}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${DPCPP_PATH}/dpcpp_compiler.tar.gz -C ${DPCPP_PATH}/
23 changes: 23 additions & 0 deletions .github/docker/install_libbacktrace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Copyright (C) 2023 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# install_libbacktrace.sh - builds and installs tracing library
#

set -e

if [ "${SKIP_LIBBACKTRACE_BUILD}" ]; then
echo "Variable 'SKIP_LIBBACKTRACE_BUILD' is set; skipping building libbacktrace"
exit
fi

git clone https://github.com/ianlancetaylor/libbacktrace.git
pushd libbacktrace
./configure
make -j$(nproc)
make install -j$(nproc)
popd
70 changes: 70 additions & 0 deletions .github/docker/ubuntu-22.04.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (C) 2023 Intel Corporation
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#
# Dockerfile - image with all Unified Runtime dependencies.
#

# Pull base image
FROM registry.hub.docker.com/library/ubuntu:22.04

# Set environment variables
ENV OS ubuntu
ENV OS_VER 22.04
ENV NOTTY 1
ENV DEBIAN_FRONTEND noninteractive

# Additional parameters to build docker without building components.
# These ARGs can be set in docker building phase and are used
# within bash scripts (executed within docker).
ARG SKIP_DPCPP_BUILD
ARG SKIP_LIBBACKTRACE_BUILD

# Base development packages
ARG BASE_DEPS="\
build-essential \
cmake \
git"

# Unified Runtime's dependencies
ARG UR_DEPS="\
doxygen \
python3 \
python3-pip"

# Unified Runtime's dependencies (installed via pip)
ARG UR_PYTHON_DEPS="\
clang-format==15.0.7"

# Miscellaneous for our builds/CI (optional)
ARG MISC_DEPS="\
clang \
sudo \
wget \
whois"

# Update and install required packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
${BASE_DEPS} \
${UR_DEPS} \
${MISC_DEPS} \
&& apt-get clean all

RUN pip3 install ${UR_PYTHON_DEPS}

# Install DPC++
COPY install_dpcpp.sh install_dpcpp.sh
ENV DPCPP_PATH=/opt/dpcpp
RUN ./install_dpcpp.sh

# Install libbacktrace
COPY install_libbacktrace.sh install_libbacktrace.sh
RUN ./install_libbacktrace.sh

# Add a new (non-root) 'user'
ENV USER user
ENV USERPASS pass
RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
46 changes: 43 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
build_type: [Debug, Release]
compiler: [{c: gcc, cxx: g++}]
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=OFF']
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF']
include:
- os: 'ubuntu-22.04'
build_type: Release
Expand Down Expand Up @@ -53,9 +54,15 @@ jobs:
cd libbacktrace
./configure
make
sudo make install
sudo make install
cd ..

- name: Download DPC++
run: |
sudo apt install libncurses5
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz

- name: Configure CMake
run: >
cmake
Expand All @@ -66,7 +73,9 @@ jobs:
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
${{matrix.libbacktrace}}
${{matrix.pool_tracking}}

- name: Generate source from spec, check for uncommitted diff
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -77,7 +86,7 @@ jobs:

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

adapter-build:
name: Build - Adapters on Ubuntu
Expand Down Expand Up @@ -165,4 +174,35 @@ jobs:

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


macos-build:
name: Build - MacOS
strategy:
matrix:
os: ['macos-12', 'macos-13']
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install prerequisites
run: python3 -m pip install -r third_party/requirements.txt

- name: Configure CMake
run: >
cmake
-B${{github.workspace}}/build
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DCMAKE_BUILD_TYPE=Release
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
-DUMF_ENABLE_POOL_TRACKING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: pip install -r third_party/requirements.txt

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON
run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON

- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
run: python3 -m pip install -r third_party/requirements.txt

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON

- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc) --config Release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
linux:
name: Coverity
runs-on: ubuntu-latest

steps:
- name: Clone the git repo
uses: actions/checkout@v3
Expand All @@ -35,12 +35,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y doxygen

- name: Install pip packages
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 -DUR_FORMAT_CPP_STYLE=ON
run: cmake -B $WORKDIR/build -DUR_ENABLE_TRACING=ON -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_FORMAT_CPP_STYLE=ON -DUMF_ENABLE_POOL_TRACKING=ON

- name: Generate source from spec, check for uncommitted diff
run: |
Expand Down
31 changes: 13 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ include(CTest)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(helpers)

if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_FIND_FRAMEWORK NEVER)
endif()

find_package(Python3 COMPONENTS Interpreter)

set(CMAKE_CXX_STANDARD 17)
Expand All @@ -26,10 +30,12 @@ option(UR_FORMAT_CPP_STYLE "format code style of C++ sources" OFF)
option(UR_USE_ASAN "enable AddressSanitizer" OFF)
option(UR_USE_UBSAN "enable UndefinedBehaviorSanitizer" OFF)
option(UR_USE_MSAN "enable MemorySanitizer" OFF)
option(UMA_BUILD_SHARED_LIBRARY "Build UMA as shared library" OFF)
option(UR_USE_TSAN "enable ThreadSanitizer" OFF)
option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF)
option(UR_ENABLE_TRACING "enable api tracing through xpti" OFF)
option(VAL_USE_LIBBACKTRACE_BACKTRACE "enable libbacktrace validation backtrace for linux" OFF)
option(UR_BUILD_TOOLS "build ur tools" ON)
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" OFF)
option(UR_BUILD_ADAPTER_L0 "build level 0 adapter from SYCL" OFF)
option(UR_BUILD_ADAPTER_CUDA "build cuda adapter from SYCL" OFF)
option(UR_BUILD_ADAPTER_HIP "build hip adapter from SYCL" OFF)
Expand All @@ -51,14 +57,7 @@ if(MSVC)
set(CUSTOM_COMMAND_BINARY_DIR ${CUSTOM_COMMAND_BINARY_DIR}/$<CONFIG>)
endif()

# CXX flags setup
if(NOT MSVC)
add_compile_options(-fPIC -Wall -Wpedantic
$<$<CXX_COMPILER_ID:GNU>:-fdiagnostics-color=always>
$<$<CXX_COMPILER_ID:Clang>:-fcolor-diagnostics>)
if(UR_DEVELOPER_MODE)
add_compile_options(-Werror -fno-omit-frame-pointer)
endif()
# Determine if libstdc++ is being used.
check_cxx_source_compiles("
#include <array>
Expand All @@ -74,21 +73,13 @@ if(NOT MSVC)
# is available we still need to link this library.
link_libraries(stdc++fs)
endif()
elseif(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
add_compile_options(/MP /W3 /MD$<$<CONFIG:Debug>:d>)

if(UR_DEVELOPER_MODE)
add_compile_options(/WX)
endif()
endif()

if(UR_ENABLE_TRACING)
add_compile_definitions(UR_ENABLE_TRACING)

# fetch xpti proxy library for the tracing layer
FetchContentSparse_Declare(xpti https://github.com/intel/llvm.git "sycl-nightly/20230304" "xpti")
FetchContentSparse_Declare(xpti https://github.com/intel/llvm.git "sycl-nightly/20230703" "xpti")
FetchContent_MakeAvailable(xpti)

# set -fPIC for xpti since we are linking it with a shared library
Expand All @@ -100,7 +91,7 @@ if(UR_ENABLE_TRACING)
set(XPTI_DIR ${xpti_SOURCE_DIR})
set(XPTI_ENABLE_TESTS OFF CACHE INTERNAL "Turn off xptifw tests")

FetchContentSparse_Declare(xptifw https://github.com/intel/llvm.git "sycl-nightly/20230304" "xptifw")
FetchContentSparse_Declare(xptifw https://github.com/intel/llvm.git "sycl-nightly/20230703" "xptifw")

FetchContent_MakeAvailable(xptifw)

Expand Down Expand Up @@ -130,6 +121,10 @@ if(UR_USE_UBSAN)
add_sanitizer_flag(undefined)
endif()

if(UR_USE_TSAN)
add_sanitizer_flag(thread)
endif()

if(UR_USE_MSAN)
message(WARNING "MemorySanitizer requires that all code is built with
its instrumentation, otherwise false positives are possible.
Expand Down
Loading