Skip to content

Commit

Permalink
Merge remote-tracking branch 'intel/sycl' into steffen/group_algs_sup…
Browse files Browse the repository at this point in the history
…port_shuffles
  • Loading branch information
steffenlarsen committed Mar 14, 2024
2 parents 41dc4eb + ab851d2 commit 60c34c8
Show file tree
Hide file tree
Showing 5,112 changed files with 229,259 additions and 95,282 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 0 additions & 8 deletions .arcconfig

This file was deleted.

15 changes: 0 additions & 15 deletions .arclint

This file was deleted.

2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-const-correctness,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-use-anonymous-namespace,readability-identifier-naming'
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-const-correctness,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-use-anonymous-namespace,readability-identifier-naming,-misc-include-cleaner'
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/2-bug-report-cuda.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CUDA-specific bug report
description: Please use this template in case of CUDA-specific issue
description: >
Please use this template in case of CUDA-specific issue.
Check https://developer.codeplay.com/products/oneapi/nvidia/latest/guides/troubleshooting
before submitting a bug report.
labels: ["bug", "cuda"]
body:
- type: textarea
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/3-bug-report-hip.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: HIP-specific bug report
description: Please use this template in case of HIP-specific issue
description: >
Please use this template in case of HIP-specific issue.
Check https://developer.codeplay.com/products/oneapi/amd/latest/guides/troubleshooting
before submitting a bug report.
labels: ["bug", "hip"]
body:
- type: textarea
Expand Down
23 changes: 23 additions & 0 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -846,9 +846,32 @@ backend:PowerPC:
- clang/lib/Driver/ToolChains/Arch/PPC.*
- clang/test/CodeGen/PowerPC/**

backend:SystemZ:
- llvm/include/llvm/BinaryFormat/ELFRelocs/SystemZ*
- llvm/include/llvm/BinaryFormat/GOFF.h
- llvm/include/llvm/IR/IntrinsicsSystemZ.td
- llvm/lib/Target/SystemZ/**
- llvm/test/Analysis/**/SystemZ/**
- llvm/test/CodeGen/SystemZ/**
- llvm/test/DebugInfo/SystemZ/**
- llvm/test/ExecutionEngine/**/SystemZ/**
- llvm/test/MC/Disassembler/SystemZ/**
- llvm/test/MC/GOFF/**
- llvm/test/MC/SystemZ/**
- llvm/test/Transforms/**/SystemZ/**
- clang/include/clang/Basic/BuiltinsSystemZ.*
- clang/lib/Basic/Targets/SystemZ.*
- clang/lib/CodeGen/Targets/SystemZ.cpp
- clang/lib/Driver/ToolChains/ZOS*
- clang/lib/Driver/ToolChains/Arch/SystemZ.*
- clang/test/CodeGen/SystemZ/**

third-party:unittests:
- third-party/unittests/**

third-party:benchmark:
- third-party/benchmark/**

llvm:binary-utilities:
- llvm/docs/CommandGuide/llvm-*
- llvm/include/llvm/BinaryFormat/**
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-ci-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@ jobs:
cp ./.github/workflows/containers/github-action-ci/storage.conf ~/.config/containers/storage.conf
podman info
# Download the container image into /mnt/podman rather than
# $GITHUB_WORKSPACE to avoid space limitations on the default drive
# and use the permissions setup for /mnt/podman.
- name: Download stage1-toolchain
uses: actions/download-artifact@v4
with:
name: stage1-toolchain
path: /mnt/podman

- name: Load stage1-toolchain
run: |
podman load -i stage1-toolchain.tar
podman load -i /mnt/podman/stage1-toolchain.tar
- name: Build Container
working-directory: ./.github/workflows/containers/github-action-ci/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ COPY --from=stage2-toolchain $LLVM_SYSROOT $LLVM_SYSROOT
# Need to install curl for hendrikmuhs/ccache-action
# Need nodejs for some of the GitHub actions.
# Need perl-modules for clang analyzer tests.
# Need git for SPIRV-Tools tests.
RUN apt-get update && \
apt-get install -y \
binutils \
cmake \
curl \
git \
libstdc++-11-dev \
ninja-build \
nodejs \
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,39 @@ jobs:
if: inputs.tests_selector == 'cts'
env:
ONEAPI_DEVICE_SELECTOR: ${{ inputs.target_devices }}
# By-default GitHub actions execute the "run" shell script with -e option,
# so the execution terminates if any command returns a non-zero status.
# Since we're using a loop to run all test-binaries separately, some test
# may fail and terminate the execution. Setting "shell" value to override
# the default behavior.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#custom-shell
shell: bash {0}
# FIXME: For some reason the "sub_group api" test-case is failing with
# SIGSEGV while running test_all, so running each binary separately.
# BTW test_all requires a lot of resources to build it, so probably it'll
# be better to build each binary also separately.
# run: |
# ./build-cts/bin/test_all $CTS_TEST_ARGS
run: |
status=""
failed_suites=""
for i in `ls -1 ./build-cts/bin`; do
if [ "$i" != "test_all" ]; then
echo "::group::Running $i"
build-cts/bin/$i
if [ $? -ne 0 ]; then
status=1
if [$failed_suites == ""]; then
failed_suites=$i
else
failed_suites="$failed_suites, $i"
fi
fi
echo "::endgroup::"
fi
done
if [ -n "$status" ]; then
echo "Failed suite(s): $failed_suites"
exit 1
fi
exit 0
9 changes: 8 additions & 1 deletion .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,47 +33,54 @@ jobs:
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
target_devices: ext_oneapi_hip:gpu
tests_selector: e2e

- name: Intel L0 GPU
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: ext_oneapi_level_zero:gpu
reset_gpu: true
tests_selector: e2e

- name: Intel OCL GPU
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: opencl:gpu
reset_gpu: true
tests_selector: e2e

- name: OCL CPU (AMD)
runner: '["Linux", "amdgpu"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001
target_devices: opencl:cpu
tests_selector: e2e

- name: OCL CPU (Intel/GEN12)
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001 --privileged --cap-add SYS_ADMIN
target_devices: opencl:cpu
tests_selector: e2e

- name: OCL CPU (Intel/Arc)
runner: '["Linux", "arc"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001
target_devices: opencl:cpu
tests_selector: e2e

- name: Self-hosted CUDA
runner: '["Linux", "cuda"]'
image: ghcr.io/intel/llvm/ubuntu2204_build:latest
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
target_devices: ext_oneapi_cuda:gpu
tests_selector: e2e

- name: SYCL-CTS
runner: '["cts-cpu"]'
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: opencl:cpu
Expand Down
4 changes: 4 additions & 0 deletions bolt/include/bolt/Core/BinaryContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,10 @@ class BinaryContext {
return getUniqueSectionByName(".gdb_index");
}

ErrorOr<BinarySection &> getDebugNamesSection() const {
return getUniqueSectionByName(".debug_names");
}

/// @}

/// Register \p TargetFunction as a fragment of \p Function if checks pass:
Expand Down
8 changes: 8 additions & 0 deletions bolt/include/bolt/Core/BinaryFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,14 @@ class BinaryFunction {
/// Returns false if disassembly failed.
Error disassemble();

/// An external interface to register a branch while the function is in
/// disassembled state. Allows to make custom modifications to the
/// disassembler. E.g., a pre-CFG pass can add an instruction and register
/// a branch that will later be used during the CFG construction.
///
/// Return a label at the branch destination.
MCSymbol *registerBranch(uint64_t Src, uint64_t Dst);

Error handlePCRelOperand(MCInst &Instruction, uint64_t Address,
uint64_t Size);

Expand Down
7 changes: 5 additions & 2 deletions bolt/include/bolt/Core/DIEBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define BOLT_CORE_DIE_BUILDER_H

#include "bolt/Core/BinaryContext.h"
#include "bolt/Core/DebugNames.h"
#include "llvm/CodeGen/DIE.h"
#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
Expand Down Expand Up @@ -127,6 +128,7 @@ class DIEBuilder {
DWARFUnit *SkeletonCU{nullptr};
uint64_t UnitSize{0};
llvm::DenseSet<uint64_t> AllProcessed;
DWARF5AcceleratorTable &DebugNamesTable;

/// Returns current state of the DIEBuilder
State &getState() { return *BuilderState.get(); }
Expand Down Expand Up @@ -206,8 +208,8 @@ class DIEBuilder {
/// Update references once the layout is finalized.
void updateReferences();

/// Update the Offset and Size of DIE.
uint32_t computeDIEOffset(const DWARFUnit &CU, DIE &Die, uint32_t &CurOffset);
/// Update the Offset and Size of DIE, populate DebugNames table.
uint32_t finalizeDIEs(DWARFUnit &CU, DIE &Die, uint32_t &CurOffset);

void registerUnit(DWARFUnit &DU, bool NeedSort);

Expand Down Expand Up @@ -269,6 +271,7 @@ class DIEBuilder {

public:
DIEBuilder(BinaryContext &BC, DWARFContext *DwarfContext,
DWARF5AcceleratorTable &DebugNamesTable,
DWARFUnit *SkeletonCU = nullptr);

/// Returns enum to what we are currently processing.
Expand Down
9 changes: 6 additions & 3 deletions bolt/include/bolt/Core/DebugData.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ class DebugStrOffsetsWriter {
/// Update Str offset in .debug_str in .debug_str_offsets.
void updateAddressMap(uint32_t Index, uint32_t Address);

/// Get offset for given index in original .debug_str_offsets section.
uint64_t getOffset(uint32_t Index) const { return StrOffsets[Index]; }
/// Writes out current sections entry into .debug_str_offsets.
void finalizeSection(DWARFUnit &Unit, DIEBuilder &DIEBldr);

Expand All @@ -463,7 +465,7 @@ class DebugStrOffsetsWriter {
std::unique_ptr<DebugStrOffsetsBufferVector> StrOffsetsBuffer;
std::unique_ptr<raw_svector_ostream> StrOffsetsStream;
std::map<uint32_t, uint32_t> IndexToAddressMap;
std::vector<uint32_t> StrOffsets;
SmallVector<uint32_t, 5> StrOffsets;
std::unordered_map<uint64_t, uint64_t> ProcessedBaseOffsets;
bool StrOffsetSectionWasModified = false;
};
Expand All @@ -484,11 +486,12 @@ class DebugStrWriter {
/// Returns False if no strings were added to .debug_str.
bool isInitialized() const { return !StrBuffer->empty(); }

/// Initializes Buffer and Stream.
void initialize();

private:
/// Mutex used for parallel processing of debug info.
std::mutex WriterMutex;
/// Initializes Buffer and Stream.
void initialize();
/// Creates internal data structures.
void create();
std::unique_ptr<DebugStrBufferVector> StrBuffer;
Expand Down
Loading

0 comments on commit 60c34c8

Please sign in to comment.