Skip to content

Commit 7f737b4

Browse files
Merge remote-tracking branch 'upstream/sycl' into sycl-mlir
2 parents c68157d + d01f85c commit 7f737b4

File tree

108 files changed

+3013
-794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3013
-794
lines changed

.github/workflows/sycl_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
build_cache_root: "/__w/"
4848
build_cache_suffix: opaque_pointers
4949
build_artifact_suffix: opaque_pointers
50-
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DDPCPP_ENABLE_OPAQUE_POINTERS=TRUE --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
50+
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
5151

5252
ubuntu2204_opaque_pointers_build_test:
5353
if: github.repository == 'intel/llvm'
@@ -58,7 +58,7 @@ jobs:
5858
build_cache_root: "/__w/"
5959
build_cache_suffix: opaque_pointers
6060
build_artifact_suffix: opaque_pointers
61-
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DDPCPP_ENABLE_OPAQUE_POINTERS=TRUE --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
61+
build_configure_extra_args: "--hip --cuda --enable-esimd-emulator --cmake-opt=-DSPIRV_ENABLE_OPAQUE_POINTERS=TRUE"
6262
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
6363

6464
windows_default:

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
911911
PB.registerPipelineStartEPCallback(
912912
[&](ModulePassManager &MPM, OptimizationLevel Level) {
913913
MPM.addPass(ESIMDVerifierPass(LangOpts.SYCLESIMDForceStatelessMem));
914-
MPM.addPass(SYCLPropagateAspectsUsagePass());
914+
MPM.addPass(
915+
SYCLPropagateAspectsUsagePass(/*ExcludeAspects=*/{"fp64"}));
915916
});
916917

917918
// Add the InferAddressSpaces pass for all the SPIR[V] targets
@@ -1026,6 +1027,10 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
10261027
if (LangOpts.EnableDAEInSpirKernels)
10271028
MPM.addPass(DeadArgumentEliminationSYCLPass());
10281029

1030+
// Rerun aspect propagation without warning diagnostics.
1031+
MPM.addPass(SYCLPropagateAspectsUsagePass(/*ExcludeAspects=*/{},
1032+
/*ValidateAspects=*/false));
1033+
10291034
// Add SPIRITTAnnotations pass to the pass manager if
10301035
// -fsycl-instrument-device-code option was passed. This option can be
10311036
// used only with spir triple.

clang/lib/Driver/ToolChains/Gnu.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,13 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
591591
ToolChain.addFastMathRuntimeIfAvailable(Args, CmdArgs);
592592
}
593593

594+
// Performing link for dependency file information, undefined symbols are OK.
595+
// True link time errors for symbols will be captured at host link.
596+
if (JA.getType() == types::TY_Host_Dependencies_Image) {
597+
CmdArgs.push_back("-z");
598+
CmdArgs.push_back("undefs");
599+
}
600+
594601
Args.AddAllArgs(CmdArgs, options::OPT_L);
595602
Args.AddAllArgs(CmdArgs, options::OPT_u);
596603

clang/test/CodeGenSYCL/fpga-attr-do-while-loops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang++ -fsycl-device-only -fintelfpga -S %s -o - | FileCheck %s
1+
// RUN: %clang -fsycl-device-only -fintelfpga -S %s -o - | FileCheck %s
22

33
#include "Inputs/sycl.hpp"
44

clang/test/Driver/sycl-offload-intelfpga-link.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@
105105
// RUN: | FileCheck %s --check-prefix=CHK-FPGA-LINK-WARN-AOCR
106106
// CHK-FPGA-LINK-WARN-AOCR: warning: FPGA archive '{{.*}}-aocr.a' does not contain matching emulation/hardware expectancy
107107

108+
/// Check deps behaviors with input fat archive and creating aocx archive
109+
// RUN: %clangxx -fsycl -fintelfpga -fsycl-link=image \
110+
// RUN: -target x86_64-unknown-linux-gnu %S/Inputs/SYCL/liblin64.a \
111+
// RUN: %s -### 2>&1 \
112+
// RUN: | FileCheck %s --check-prefix=CHK-FPGA-LINK-UNDEFS
113+
// CHK-FPGA-LINK-UNDEFS: ld{{.*}} "-z" "undefs"
114+
// CHK-FPGA-LINK-UNDEFS: clang-offload-deps{{.*}}
115+
108116
/// -fintelfpga -fsycl-link from source
109117
// RUN: touch %t.cpp
110118
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fintelfpga -fsycl-link=early %t.cpp -ccc-print-phases 2>&1 \

clang/test/Driver/sycl-offload-static-lib-2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=nvptx64-nvidia-cuda %t_lib.a -o output_name -lOpenCL -### %s 2>&1 \
151151
// RUN: | FileCheck %s -check-prefix=STATIC_LIB_SRC2 -DBUNDLE_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50 -DDEPS_TRIPLE=sycl-nvptx64-nvidia-cuda-sm_50
152152
// STATIC_LIB_SRC2: clang{{.*}} "-emit-obj" {{.*}} "-o" "[[HOSTOBJ:.+\.o]]"
153-
// STATIC_LIB_SRC2: ld{{(.exe)?}}" {{.*}} "-o" "[[HOSTEXE:.+\.out]]"
153+
// STATIC_LIB_SRC2: ld{{(.exe)?}}" {{.*}} "-o" "[[HOSTEXE:.+\.out]]" {{.*}}"-z" "undefs"
154154
// STATIC_LIB_SRC2: clang-offload-deps{{.*}} "-targets=[[DEPS_TRIPLE]]" "-outputs=[[OUTDEPS:.+\.bc]]" "[[HOSTEXE]]"
155155
// STATIC_LIB_SRC2_DEF: clang-offload-bundler{{.*}} "-type=aoo" "-targets=[[BUNDLE_TRIPLE]]" {{.*}} "-output=[[OUTLIB:.+\.txt]]"
156156
// STATIC_LIB_SRC2_NVPTX: clang-offload-bundler{{.*}} "-type=a" "-targets=[[BUNDLE_TRIPLE]]" {{.*}} "-output=[[OUTLIB:.+\.a]]"

libclc/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,12 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
381381
# have to be explicity declared in the soruce.
382382
list( APPEND flags -Xclang -fdeclare-spirv-builtins)
383383

384+
if(NOT SPIRV_ENABLE_OPAQUE_POINTERS)
385+
list(APPEND flags "-UENABLE_OPAQUE_POINTERS")
386+
list(APPEND flags "SHELL:-Xclang -no-opaque-pointers")
387+
list(APPEND opt_flags "-opaque-pointers=0")
388+
endif()
389+
384390
# OpenCL 3.0 extensions
385391
list( APPEND flags -cl-std=CL3.0 "SHELL:-Xclang" )
386392
string(CONCAT CL_3_0_EXTENSIONS

libclc/generic/include/spirv/spirv_types.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,16 @@ enum GroupOperation {
4646
ExclusiveScan = 2,
4747
};
4848

49+
typedef struct {
50+
float real, imag;
51+
} complex_float;
52+
53+
typedef struct {
54+
double real, imag;
55+
} complex_double;
56+
57+
typedef struct {
58+
half real, imag;
59+
} complex_half;
60+
4961
#endif // CLC_SPIRV_TYPES

0 commit comments

Comments
 (0)