Skip to content

Commit

Permalink
Merge branch 'sycl' into Testing-adding-handles-to-opencl
Browse files Browse the repository at this point in the history
  • Loading branch information
omarahmed1111 committed Nov 5, 2024
2 parents 5c296e3 + eded703 commit 1f5b4a4
Show file tree
Hide file tree
Showing 554 changed files with 13,788 additions and 4,711 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ sycl/doc/extensions/ @intel/dpcpp-specification-reviewers

# Unified Runtime
sycl/cmake/modules/FetchUnifiedRuntime.cmake @intel/unified-runtime-reviewers
sycl/cmake/modules/UnifiedRuntimeTag.cmake @intel/unified-runtime-reviewers
sycl/include/sycl/detail/ur.hpp @intel/unified-runtime-reviewers
sycl/source/detail/posix_ur.cpp @intel/unified-runtime-reviewers
sycl/source/detail/ur.cpp @intel/unified-runtime-reviewers
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
branches:
- main
- sycl
- sycl-devops-pr/**
- sycl-rel-**
- 'users/**'

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with:
sarif_file: results.sarif
7 changes: 7 additions & 0 deletions .github/workflows/sycl-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ jobs:
file: ubuntu2204_intel_drivers
tag: unstable
build_args: "use_latest=true"
- name: Build + Intel Drivers Ubuntu 22.04 Docker image
file: ubuntu2204_intel_drivers
tag: alldeps
build_args: |
base_image=ghcr.io/intel/llvm/ubuntu2204_build
base_tag=latest
use_latest=false
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ jobs:
if: always() && !cancelled() && contains(inputs.changes, 'libdevice')
run: |
cmake --build $GITHUB_WORKSPACE/build --target check-libdevice
- name: Check E2E test requirements
if: always() && !cancelled() && !contains(inputs.changes, 'sycl')
run: |
# TODO consider moving this to Dockerfile.
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
LIT_OPTS="--allow-empty-runs" LIT_FILTER="e2e_test_requirements" cmake --build $GITHUB_WORKSPACE/build --target check-sycl
- name: Install
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
# TODO replace utility installation with a single CMake target
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ jobs:
with:
path: khronos_sycl_cts
repository: 'KhronosGroup/SYCL-CTS'
ref: 'SYCL-2020'
default_branch: 'SYCL-2020'
ref: 'main'
default_branch: 'main'
cache_path: "/__w/repo_cache/"
- name: SYCL CTS GIT submodules init
if: inputs.tests_selector == 'cts'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-macos-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions: read-all
jobs:
build:
name: Build
runs-on: macos-12
runs-on: macos-13
env:
CCACHE_DIR: $GITHUB_WORKSPACE/build_cache_${{ inputs.build_cache_suffix }}
CCACHE_MAXSIZE: ${{ inputs.build_cache_size }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
fi
- name: Upload binaries
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8
with:
files: |
sycl_linux.tar.gz
Expand Down
3 changes: 3 additions & 0 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def do_configure(args):

sycl_enable_xpti_tracing = "ON"
xpti_enable_werror = "OFF"
llvm_enable_zstd = "ON"

if sys.platform != "darwin":
sycl_enabled_backends.append("level_zero")
Expand Down Expand Up @@ -177,6 +178,8 @@ def do_configure(args):
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
"-DSYCL_BUILD_PI_HIP_PLATFORM={}".format(sycl_build_pi_hip_platform),
"-DLLVM_BUILD_TOOLS=ON",
"-DLLVM_ENABLE_ZSTD={}".format(llvm_enable_zstd),
"-DLLVM_USE_STATIC_ZSTD=ON",
"-DSYCL_ENABLE_WERROR={}".format(sycl_werror),
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -1566,12 +1566,12 @@ def SYCLType: InheritableAttr {
let Subjects = SubjectList<[CXXRecord, Enum], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Args = [EnumArgument<"Type", "SYCLType", /*is_string=*/true,
["accessor", "local_accessor",
["accessor", "local_accessor", "work_group_memory",
"specialization_id", "kernel_handler", "buffer_location",
"no_alias", "accessor_property_list", "group",
"private_memory", "aspect", "annotated_ptr", "annotated_arg",
"stream", "sampler", "host_pipe", "multi_ptr"],
["accessor", "local_accessor",
["accessor", "local_accessor", "work_group_memory",
"specialization_id", "kernel_handler", "buffer_location",
"no_alias", "accessor_property_list", "group",
"private_memory", "aspect", "annotated_ptr", "annotated_arg",
Expand Down
4 changes: 4 additions & 0 deletions clang/include/clang/Basic/DiagnosticDriverKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ def err_drv_sycl_missing_amdgpu_arch : Error<
"missing AMDGPU architecture for SYCL offloading; specify it with '-Xsycl-target-backend%select{|=%1}0 --offload-arch=<arch-name>'">;
def err_drv_sycl_thinlto_split_off: Error<
"'%0' is not supported when '%1' is set with '-fsycl'">;
def err_drv_sycl_offload_arch_new_driver: Error<
"'--offload-arch' is supported when '-fsycl' is set with '--offload-new-driver'">;
def err_drv_sycl_offload_arch_missing_value : Error<
"must pass in an explicit cpu or gpu architecture to '--offload-arch'">;
def warn_drv_sycl_offload_target_duplicate : Warning<
"SYCL offloading target '%0' is similar to target '%1' already specified; "
"will be ignored">, InGroup<SyclTarget>;
Expand Down
9 changes: 9 additions & 0 deletions clang/include/clang/Driver/Action.h
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,14 @@ class OffloadWrapperJobAction : public JobAction {
// Get the compilation step setting.
bool getCompileStep() const { return CompileStep; }

// Set the individual wrapping setting. This is used to tell the wrapper job
// action that the wrapping (and subsequent compile step) should be done
// with for-each instead of using -batch.
void setWrapIndividualFiles() { WrapIndividualFiles = true; }

// Get the individual wrapping setting.
bool getWrapIndividualFiles() const { return WrapIndividualFiles; }

// Set the offload kind for the current wrapping job action. Default usage
// is to use the kind of the current toolchain.
void setOffloadKind(OffloadKind SetKind) { Kind = SetKind; }
Expand All @@ -707,6 +715,7 @@ class OffloadWrapperJobAction : public JobAction {

private:
bool CompileStep = true;
bool WrapIndividualFiles = false;
OffloadKind Kind = OFK_None;
};

Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Driver/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,9 @@ class Driver {
/// @name Helper Methods
/// @{

/// MakeSYCLDeviceTriple - Returns the SYCL device triple for the
/// getSYCLDeviceTriple - Returns the SYCL device triple for the
/// specified subarch
llvm::Triple MakeSYCLDeviceTriple(StringRef TargetArch = "spir64") const;
llvm::Triple getSYCLDeviceTriple(StringRef TargetArch = "spir64") const;

/// PrintActions - Print the list of actions.
void PrintActions(const Compilation &C) const;
Expand Down
6 changes: 5 additions & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -4658,10 +4658,14 @@ def image__base : Separate<["-"], "image_base">;
def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
MetaVarName<"<file>">, HelpText<"Include file before parsing">,
Visibility<[ClangOption, CC1Option]>;
def include_footer : Separate<["-"], "include-footer">, Group<clang_i_Group>,
def include_internal_footer : Separate<["-"], "include-internal-footer">, Group<clang_i_Group>,
Visibility<[CC1Option]>,
HelpText<"Name of the footer integration file">, MetaVarName<"<file>">,
MarshallingInfoString<PreprocessorOpts<"IncludeFooter">>;
def include_internal_header : Separate<["-"], "include-internal-header">, Group<clang_i_Group>,
Visibility<[CC1Option]>,
HelpText<"Name of the header integration file">, MetaVarName<"<file>">,
MarshallingInfoString<PreprocessorOpts<"IncludeHeader">>;
def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>,
Visibility<[ClangOption, CC1Option]>,
HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
Expand Down
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/ToolChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ class ToolChain {
virtual void AddHIPIncludeArgs(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const;

/// Add arguments to use SYCL specific includes.
/// Add arguments to use system-specific SYCL includes.
virtual void AddSYCLIncludeArgs(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const;

Expand Down
1 change: 1 addition & 0 deletions clang/include/clang/Lex/PreprocessorOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class PreprocessorOptions {
std::vector<std::pair<std::string, bool/*isUndef*/>> Macros;
std::vector<std::string> Includes;
std::string IncludeFooter;
std::string IncludeHeader;
std::vector<std::string> MacroIncludes;

/// Perform extra checks when loading PCM files for mutable file systems.
Expand Down
3 changes: 2 additions & 1 deletion clang/include/clang/Sema/SemaSYCL.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ class SYCLIntegrationHeader {
kind_pointer,
kind_specialization_constants_buffer,
kind_stream,
kind_last = kind_stream
kind_work_group_memory,
kind_last = kind_work_group_memory
};

public:
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/Compilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ static bool ActionFailed(const Action *A,

// CUDA/HIP/SYCL can have the same input source code compiled multiple times
// so do not compile again if there are already failures. It is OK to abort
// the CUDA pipeline on errors.
// the CUDA/HIP/SYCL pipeline on errors.
if (A->isOffloading(Action::OFK_Cuda) || A->isOffloading(Action::OFK_HIP) ||
A->isOffloading(Action::OFK_SYCL))
return true;
Expand Down
Loading

0 comments on commit 1f5b4a4

Please sign in to comment.