Skip to content

Commit

Permalink
Merge branch 'main' into yc-PR/241107-misc-minor-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yingcong-wu authored Nov 15, 2024
2 parents 77ed88b + 50ef8c9 commit efe5db9
Show file tree
Hide file tree
Showing 176 changed files with 4,000 additions and 2,903 deletions.

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/benchmarks-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
let markdown = ""
try {
const fs = require('fs');
markdown = fs.readFileSync('benchmark_results.md', 'utf8');
markdown = fs.readFileSync('ur-repo/benchmark_results.md', 'utf8');
} catch(err) {
}
Expand All @@ -199,5 +199,5 @@ jobs:
if: ${{ always() && inputs.upload_report }}
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ github.workspace }}/ur-repo/benchmark_results.html
path: ur-repo/benchmark_results.html
key: benchmark-results-${{ matrix.adapter.str_name }}-${{ github.run_id }}
82 changes: 50 additions & 32 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,81 @@
#
# Copyright (C) 2023-2024 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
#
# Coverity - static analysis build. It requires Coverity's token (set in CI's secret).
name: coverity-unified-runtime
# It runs static analysis build - Coverity. It requires special token (set in CI's secret).

on:
workflow_dispatch:
schedule:
# Run every day at 22:00 UTC
- cron: '0 22 * * *'

env:
WORKDIR: ${{ github.workspace }}
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
COVERITY_SCAN_PROJECT_NAME: ${{ github.repository }}
COVERITY_SCAN_BUILD_COMMAND: "cmake --build ${{github.workspace}}/build"
COVERITY_SCAN_BRANCH_PATTERN: "main"
TRAVIS_BRANCH: ${{ github.ref_name }}

permissions:
contents: read

jobs:
linux:
coverity:
name: Coverity
runs-on: coverity
# run only on upstream; forks don't have token for upstream's cov project
if: github.repository == 'oneapi-src/unified-memory-framework'
runs-on: ubuntu-latest

steps:
- name: Clone the git repo
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Install dependencies
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y libhwloc-dev libtbb-dev cuda-toolkit-12-6
- name: Install pip packages
run: pip install -r third_party/requirements.txt

- name: Download Coverity
run: |
wget -O coverity_tool.tgz -nv https://scan.coverity.com/download/linux64 \
--post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=oneapi-src%2Funified-runtime"
- name: Extract Coverity
run: tar xzf coverity_tool.tgz

# TODO: enable HIP adapter as well (requires proper package(s) installation)
- name: Configure CMake
run: >
cmake
-B $WORKDIR/build
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Release
-DUR_DEVELOPER_MODE=OFF
-DUR_FORMAT_CPP_STYLE=ON
-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
-DCUDA_CUDA_LIBRARY=/usr/local/cuda-12.6/targets/x86_64-linux/lib/stubs/libcuda.so
-DUR_BUILD_ADAPTER_NATIVE_CPU=ON
-DUR_BUILD_ADAPTER_HIP=ON
-DUR_BUILD_ADAPTER_HIP=OFF
-DUR_BUILD_ADAPTER_OPENCL=ON
- name: Run Coverity
- name: Build
run: |
export COVERITY_DIR=$(find . -maxdepth 1 -type d -name "cov-analysis-linux64-*" | head -n 1)
if [ -n "$COVERITY_DIR" ]; then
export PATH="$PATH:$COVERITY_DIR/bin"
fi
cov-build --dir ${{github.workspace}}/coverity-files cmake --build ${{github.workspace}}/build --config Release -j$(nproc)
- name: Create tarball to analyze
run: tar czvf ur-coverity-files.tgz coverity-files

- name: Push tarball to scan
run: |
cd $WORKDIR/build
wget https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh
patch < "../.github/scripts/0001-travis-fix-travisci_build_coverity_scan.sh.patch"
bash ./travisci_build_coverity_scan.sh
BRANCH_NAME=$(echo ${GITHUB_REF_NAME})
COMMIT_ID=$(echo $GITHUB_SHA)
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
--form [email protected] \
--form [email protected] \
--form version="$COMMIT_ID" \
--form description="$BRANCH_NAME:$COMMIT_ID" \
https://scan.coverity.com/builds\?project\=oneapi-src%2Funified-runtime
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ jobs:
id: download-bench-html
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ github.workspace }}/ur-repo/benchmark_results.html
path: ur-repo/benchmark_results.html
key: benchmark-results-
restore-keys: benchmark-results-

- name: Move benchmark HTML
# exact or partial cache hit
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
[![Build and test](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/cmake.yml)
[![Bandit](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/bandit.yml)
[![CodeQL](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/codeql.yml)
[![Coverity](https://scan.coverity.com/projects/28213/badge.svg)](https://scan.coverity.com/projects/oneapi-src-unified-runtime)
[![Coverity build](https://github.com/oneapi-src/unified-runtime/actions/workflows/coverity.yml/badge.svg?branch=main)](https://github.com/oneapi-src/unified-runtime/actions/workflows/coverity.yml)
[![Coverity report](https://scan.coverity.com/projects/28213/badge.svg)](https://scan.coverity.com/projects/oneapi-src-unified-runtime)
[![Nightly](https://github.com/oneapi-src/unified-runtime/actions/workflows/nightly.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/nightly.yml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/unified-runtime/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/unified-runtime)
[![Trivy](https://github.com/oneapi-src/unified-runtime/actions/workflows/trivy.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/trivy.yml)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FetchLevelZero.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if (NOT DEFINED LEVEL_ZERO_LIBRARY OR NOT DEFINED LEVEL_ZERO_INCLUDE_DIR)
set(UR_LEVEL_ZERO_LOADER_REPO "https://github.com/oneapi-src/level-zero.git")
endif()
if (UR_LEVEL_ZERO_LOADER_TAG STREQUAL "")
set(UR_LEVEL_ZERO_LOADER_TAG v1.17.39)
set(UR_LEVEL_ZERO_LOADER_TAG v1.18.5)
endif()

# Disable due to a bug https://github.com/oneapi-src/level-zero/issues/104
Expand Down
10 changes: 5 additions & 5 deletions cmake/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,17 @@ function(add_ur_target_link_options name)
endif()
elseif(MSVC)
target_link_options(${name} PRIVATE
/DYNAMICBASE
/HIGHENTROPYVA
/NXCOMPAT
LINKER:/DYNAMICBASE
LINKER:/HIGHENTROPYVA
LINKER:/NXCOMPAT
)
endif()
endfunction()

function(add_ur_target_exec_options name)
if(MSVC)
target_link_options(${name} PRIVATE
/ALLOWISOLATION
LINKER:/ALLOWISOLATION
)
endif()
endfunction()
Expand All @@ -159,7 +159,7 @@ function(add_ur_library name)
add_ur_target_link_options(${name})
if(MSVC)
target_link_options(${name} PRIVATE
$<$<STREQUAL:$<TARGET_LINKER_FILE_NAME:${name}>,link.exe>:/DEPENDENTLOADFLAG:0x2000>
$<$<STREQUAL:$<TARGET_LINKER_FILE_NAME:${name}>,link.exe>:LINKER:/DEPENDENTLOADFLAG:0x2000>
)
endif()
endfunction()
Expand Down
Loading

0 comments on commit efe5db9

Please sign in to comment.