Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: intel/intel-graphics-compiler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: igc-1.0.11
Choose a base ref
...
head repository: intel/intel-graphics-compiler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 6,243 changed files with 1,584,846 additions and 635,582 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
218 changes: 218 additions & 0 deletions .github/workflows/build-IGC.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================

name: Build IGC

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions: read-all

jobs:
download-OpenCL-Clang: # openCL Clang is downloaded from intel/intel-graphics-compiler releases
if: github.repository == 'intel/intel-graphics-compiler'
runs-on: ubuntu-latest
env:
CLANG_CACHE_VALID: true
CLANG_CACHE_KEY: none
ORIGINAL_CLANG_CACHE_KEY: none
outputs:
CLANG_CACHE_KEY: ${{ env.CLANG_CACHE_KEY }}
steps:
- uses: oprypin/find-latest-tag@v1
with:
repository: intel/intel-graphics-compiler
releases-only: true
id: get-latest-IGC-release-tag
- name: set initial cache key
run: |
LOC_CLANG_CACHE_KEY="${{ steps.get-latest-IGC-release-tag.outputs.tag }}"
echo "CLANG_CACHE_KEY=$LOC_CLANG_CACHE_KEY" >> $GITHUB_ENV
echo "ORIGINAL_CLANG_CACHE_KEY=$LOC_CLANG_CACHE_KEY" >> $GITHUB_ENV
- name: caching downloaded OpenCL Clang # Downloading a new OpenCL Clang only after the new IGC is released
id: cache-igc-release
uses: actions/cache@v3
with:
path: ./igc-official-release
key: ${{ env.CLANG_CACHE_KEY }}
- name: checking for valid cache hit
if: steps.cache-igc-release.outputs.cache-hit == 'true'
run: |
if [[ $(ls ./igc-official-release | wc -c) == "0" ]]; then
echo "CLANG_CACHE_VALID=false" >> $GITHUB_ENV
echo "CLANG_CACHE_KEY=${{ steps.get-latest-IGC-release-tag.outputs.tag }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}" >> $GITHUB_ENV
fi
- name: creating a folder for downloaded deb files
if: ${{ steps.cache-igc-release.outputs.cache-hit != 'true' || env.CLANG_CACHE_VALID != 'true' }}
run: mkdir -p igc-official-release
- name: download latest igc release
if: ${{ steps.cache-igc-release.outputs.cache-hit != 'true' || env.CLANG_CACHE_VALID != 'true' }}
working-directory: ./igc-official-release
# To install openCL clang from Deb package, IGC must also be installed. Therefore, the last IGC release is also downloaded.
run: curl -s https://api.github.com/repos/intel/intel-graphics-compiler/releases/latest | grep browser_download_url | egrep 'opencl-|core-' | cut -d '"' -f 4 | wget -qi -
- name: checking if downloaded deb files are here
run: |
ls ./igc-official-release
if [[ $(ls ./igc-official-release | wc -c) == "0" ]]; then
exit 1
fi
- name: force redownload if invalid cache
if: env.CLANG_CACHE_VALID != 'true'
id: force-redownload
uses: actions/cache@v3
with:
path: ./igc-official-release
key: ${{ env.CLANG_CACHE_KEY }}
restore-keys: ${{ env.ORIGINAL_CLANG_CACHE_KEY }}

build-SPIRV-LLVM-Translator:
if: github.repository == 'intel/intel-graphics-compiler'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ '24.04' ]
llvm_ver: [ 15 ]

steps:
- uses: actions/checkout@v3
- name: cloning SPIRV-LLVM-Translator repository
run: git clone --branch llvm_release_${{ matrix.llvm_ver }}0 https://github.com/KhronosGroup/SPIRV-LLVM-Translator
- name: getting latest commit hash from SPIRV-LLVM-Translator repository
id: SPIRV-LLVM-Translator-hash
working-directory: ./SPIRV-LLVM-Translator
run: |
SPIRV_TRANSLATOR_SHA_SHORT=$(git log -1 --pretty=format:"%h")
echo "This is SPIRV-LLVM-Translator repository latest commit hash = ${SPIRV_TRANSLATOR_SHA_SHORT}"
echo "spirv_translator_sha_short=$SPIRV_TRANSLATOR_SHA_SHORT" >> $GITHUB_OUTPUT
- name: caching SPIRV-LLVM-Translator deb files
id: cache-spirv-llvm-translator
uses: actions/cache@v3
with:
path: ./build-SPIRV-LLVM-Translator
key: ${{ steps.SPIRV-LLVM-Translator-hash.outputs.spirv_translator_sha_short }}-ubuntu${{ matrix.ubuntu_version }}-llvm${{ matrix.llvm_ver }}
- name: run Docker
if: steps.cache-spirv-llvm-translator.outputs.cache-hit != 'true'
run: |
docker run --name=buildslt \
-v $(pwd)/scripts/buildSLT.sh:/buildSLT.sh \
--env DEBIAN_FRONTEND="noninteractive" \
--env UBUNTU_VERSION=${{ matrix.ubuntu_version }} \
--env LLVM_VERSION=${{ matrix.llvm_ver }} \
ubuntu:${{ matrix.ubuntu_version }} \
sh /buildSLT.sh
- name: creating folders to store SPIRV-LLVM-Translator build outputs
if: steps.cache-spirv-llvm-translator.outputs.cache-hit != 'true'
run: mkdir build-SPIRV-LLVM-Translator && mkdir temp-SPIRV-LLVM-Translator-build
- name: copying artifact from docker to github host
if: steps.cache-spirv-llvm-translator.outputs.cache-hit != 'true'
run: sudo docker cp buildslt:/SPIRV-LLVM-Translator/build ./temp-SPIRV-LLVM-Translator-build
- name: copy deb file to main artifact folder
if: steps.cache-spirv-llvm-translator.outputs.cache-hit != 'true'
run: sudo cp ./temp-SPIRV-LLVM-Translator-build/build/*.deb ./build-SPIRV-LLVM-Translator

build-IGC:
needs: [build-SPIRV-LLVM-Translator, download-OpenCL-Clang]
if: github.repository == 'intel/intel-graphics-compiler'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ubuntu_version: [ '24.04' ]
llvm_ver: [ 15 ]
compiler: [ gcc, clang ]
steps:
- uses: actions/checkout@v3

#Get OpenCL Clang
- uses: oprypin/find-latest-tag@v1
with:
repository: intel/intel-graphics-compiler
releases-only: true
id: get-latest-IGC-release-tag
- name: getting OpenCL Clang from cache from the previous job
id: cache-igc-release
uses: actions/cache@v3
with:
path: ./igc-official-release
key: ${{ needs.download-OpenCL-Clang.outputs.CLANG_CACHE_KEY }}
- name: checking if deb files are here
run: |
ls ./igc-official-release
if [[ $(ls ./igc-official-release | wc -c) == "0" ]]; then
exit 1
fi
#Get SPIRV-LLVM-Translator
- name: cloning SPIRV-LLVM-Translator repository
run: git clone --branch llvm_release_${{ matrix.llvm_ver }}0 https://github.com/KhronosGroup/SPIRV-LLVM-Translator
- name: getting latest commit hash from SPIRV-LLVM-Translator repository
id: SPIRV-LLVM-Translator-hash
working-directory: ./SPIRV-LLVM-Translator
run: |
SPIRV_TRANSLATOR_SHA_SHORT=$(git log -1 --pretty=format:"%h")
echo "This is SPIRV-LLVM-Translator hash = ${SPIRV_TRANSLATOR_SHA_SHORT}"
echo "spirv_translator_sha_short=$SPIRV_TRANSLATOR_SHA_SHORT" >> $GITHUB_OUTPUT
- name: getting SPIRV-LLVM-Translator deb files from cache from the previous job
id: cache-spirv-llvm-translator
uses: actions/cache@v3
with:
path: ./build-SPIRV-LLVM-Translator
key: ${{ steps.SPIRV-LLVM-Translator-hash.outputs.spirv_translator_sha_short }}-ubuntu${{ matrix.ubuntu_version }}-llvm${{ matrix.llvm_ver }}

#Build IGC
- name: Checkout IGC sources
uses: actions/checkout@v3
with:
path: workspace/igc
- name: Checkout vc-intrinsics sources
uses: actions/checkout@v3
with:
repository: intel/vc-intrinsics
ref: master
path: workspace/vc-intrinsics
- name: Checkout SPIRV-Headers sources
uses: actions/checkout@v3
with:
repository: KhronosGroup/SPIRV-Headers
ref: main
path: workspace/SPIRV-Headers
- name: Checkout the SPIRV-Headers
uses: actions/checkout@v3
with:
repository: KhronosGroup/SPIRV-Tools
ref: main
path: workspace/SPIRV-Tools
- name: get short hash
id: igc-current-short-Hash
run: echo "sha_short=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- name: run Docker
run: |
docker run --name=buildigc \
-v $(pwd)/scripts/buildIGC.sh:/buildIGC.sh \
-v $(pwd)/igc-official-release:/igc-official-release \
-v $(pwd)/build-SPIRV-LLVM-Translator:/build-SPIRV-LLVM-Translator \
-v $(pwd)/workspace:/workspace \
--env DEBIAN_FRONTEND="noninteractive" \
--env UBUNTU_VERSION=${{ matrix.ubuntu_version }} \
--env LLVM_VERSION=${{ matrix.llvm_ver }} \
--env COMPILER=${{ matrix.compiler }} \
--env IGC_SHA=${{ steps.igc-current-short-Hash.outputs.sha_short }} \
ubuntu:${{ matrix.ubuntu_version }} \
sh /buildIGC.sh
- name: creating folder to store output artifacts
run: mkdir Artifacts
- name: copying artifact from docker to github host
run: sudo docker cp buildigc:/workspace/igc/build/DEB-FILES ./Artifacts
- uses: actions/upload-artifact@v4
with:
name: IGC_Ubuntu${{ matrix.ubuntu_version }}_llvm${{ matrix.llvm_ver }}_${{ matrix.compiler }}-${{ steps.igc-current-short-Hash.outputs.sha_short }}
path: ./Artifacts/DEB-FILES/*.deb
retention-days: 30
31 changes: 31 additions & 0 deletions .github/workflows/on-pr-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2020-2021 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================

name: Notify
on:
status:
pull_request_review:

permissions: read-all

jobs:
notify:
runs-on: [self-hosted, linux]
steps:
- name: Get branch name if status changed
if: github.event_name == 'status'
run: >
echo "os_branch=${{ github.event.branches[0].name }}" >> $GITHUB_ENV
- name: Get branch name if pr review state changed
if: github.event_name == 'pull_request_review'
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: >
echo "os_branch=$PR_HEAD_REF" >> $GITHUB_ENV
- name: Notify
run: ${{ secrets.NOTIFY }}
33 changes: 33 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#=========================== begin_copyright_notice ============================
#
# Copyright (C) 2021-2023 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
#============================ end_copyright_notice =============================

name: Stale Pull Requests
on:
schedule:
- cron: '30 1 * * *' # run every day
workflow_dispatch: {}

permissions: read-all

jobs:
stale:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: [self-hosted, Linux]
steps:
- uses: actions/stale@v9
with:
stale-pr-label: stale
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Make a comment or remove the "stale" label to avoid closing the PR after 7 days.'
close-pr-message: 'This PR was closed because it was flagged as "stale" for over 7 days with no activity.'
days-before-stale: 60
days-before-close: 7
operations-per-run: 2000
delete-branch: true
82 changes: 33 additions & 49 deletions 3d/common/iStdLib/Alloc.h
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
/*===================== begin_copyright_notice ==================================
/*========================== begin_copyright_notice ============================
Copyright (c) 2017 Intel Corporation
Copyright (C) 2019-2021 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
SPDX-License-Identifier: MIT
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
============================= end_copyright_notice ===========================*/

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
======================= end_copyright_notice ==================================*/
#pragma once

#include "Debug.h"

#ifdef __cplusplus
@@ -55,22 +39,22 @@ inline void SafeDelete( Type &ptr )
#if defined( _DEBUG ) && !defined( NO_EXCEPTION_HANDLING )
#if defined( __GNUC__ )
try
{
delete ptr;
}
catch (...)
{
ASSERT(0);
}
{
delete ptr;
}
catch (...)
{
ASSERT(0);
}
#else // defined( __GNUC__ )
__try
{
delete ptr;
}
__except (1)
{
ASSERT(0);
}
{
delete ptr;
}
__except (1)
{
ASSERT(0);
}
#endif // defined( __GNUC__ )
#else // defined( _DEBUG ) && !defined( NO_EXCEPTION_HANDLING )
delete ptr;
@@ -102,22 +86,22 @@ inline void SafeDeleteArray( Type &ptr )
#if defined( _DEBUG ) && !defined( NO_EXCEPTION_HANDLING )
#if defined( __GNUC__ )
try
{
delete[] ptr;
}
catch (int e)
{
ASSERT(0);
}
{
delete[] ptr;
}
catch (int e)
{
ASSERT(0);
}
#else // defined( __GNUC__ )
__try
{
delete[] ptr;
}
__except (1)
{
ASSERT(0);
}
{
delete[] ptr;
}
__except (1)
{
ASSERT(0);
}
#endif // defined( __GNUC__ )
#else // defined( _DEBUG ) && !defined( NO_EXCEPTION_HANDLING )
delete[] ptr;
Loading