Skip to content
Draft
Changes from all commits
Commits
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
80 changes: 52 additions & 28 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,71 @@ name: Coverity Scan
on:
push:
branches:
- sycl-develop
- main
pull_request:
workflow_dispatch:
inputs:
DPCPP_VERSION:
description: "DPCPP version to use"
type: string


permissions: read-all

jobs:
coverity:
runs-on: ubuntu-latest
container: nvidia/cuda:12.4.1-devel-ubuntu22.04
runs-on: BMG
timeout-minutes: 120

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Configure image
run: >
apt update && apt install -y cmake curl git jq libstdc++-12-dev \
ninja-build python3 wget
- name: Download DPCPP
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Install Intel graphics drivers
uses: ./.github/actions/install-intel-graphics
with:
GPU: BMG
IGC: ROLLING

- name: Install DPC++
uses: ./.github/actions/install-dpcpp
with:
DPCPP_RELEASE: RELEASE
DPCPP_VERSION: ${{ inputs.DPCPP_VERSION }}
GPU: BMG
IGC: ROLLING

- name: Setup virtual environment
shell: bash
run: |
cd /usr/local
echo "Will use DPCPP ${DPCPP_VERSION:-latest}."
if [[ "${DPCPP_VERSION}" != "" ]]; then
echo "Downloading DPCPP from https://github.com/intel/llvm/releases/download/$DPCPP_VERSION/sycl_linux.tar.gz"
wget -q https://github.com/intel/llvm/releases/download/$DPCPP_VERSION/sycl_linux.tar.gz
# Install cmake and ninja if not already available
if ! command -v cmake &> /dev/null || ! command -v ninja &> /dev/null; then
echo "Installing cmake and/or ninja..."
sudo apt update
sudo apt install -y cmake ninja-build
else
latest=$(curl -sS https://api.github.com/repos/intel/llvm/releases | jq -r '[.[].tag_name|select(match("nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}"))][0]')
echo "Downloading DPCPP from https://github.com/intel/llvm/releases/download/${latest}/sycl_linux.tar.gz"
wget -q https://github.com/intel/llvm/releases/download/${latest}/sycl_linux.tar.gz
echo "cmake and ninja already available"
fi
tar -xf sycl_linux.tar.gz
- name: Configure CMake
. setvars.sh
export IGC_ExtraOCLOptions="-cl-intel-256-GRF-per-thread"
export SYCL_PROGRAM_COMPILE_OPTIONS="-ze-opt-large-register-file -gline-tables-only"
export ONEAPI_DEVICE_SELECTOR=level_zero:gpu
export IGC_VectorAliasBBThreshold=100000000000
# Persist environment variables to following steps
env >> $GITHUB_ENV
which $CXX
$CXX --version
sycl-ls

- name: Build
shell: bash
run: |
export PATH=/usr/local/bin/:$PATH
export C_INCLUDE_PATH=/usr/local/include/:$C_INCLUDE_PATH
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
export CC=clang
export CXX=clang++
cmake -G Ninja \
-DCMAKE_CUDA_HOST_COMPILER=clang++ \
-DCUTLASS_ENABLE_SYCL=ON \
-DDPCPP_SYCL_TARGET=nvptx64-nvidia-cuda \
-DDPCPP_SYCL_ARCH=sm_80
-DCUTLASS_ENABLE_SYCL=ON \
-DDPCPP_SYCL_TARGET=intel_gpu_bmg_g21 \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCUTLASS_SYCL_RUNNING_CI=ON

- uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0
with:
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
Expand Down
Loading