Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
34a11ca
Provide supports for decomposable structs
lbushi25 May 28, 2025
edec2b4
Merge branch 'sycl' of https://github.com/lbushi25/llvm into sycl
lbushi25 May 28, 2025
c87f239
Remove debugging statements and apply clang-format
lbushi25 May 28, 2025
6255cf2
Remove debugging statements and apply clang-format
lbushi25 May 28, 2025
4de6a52
Remove debugging statements and apply clang-format
lbushi25 May 28, 2025
5800d46
Remove TODO statements from code
lbushi25 May 28, 2025
d1d43f1
Wrapped speaicl types support
lbushi25 Jun 3, 2025
960ff52
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Jun 26, 2025
290288c
Test
lbushi25 Jul 11, 2025
9e90792
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Jul 11, 2025
5a2faea
Fix offsets in integration header
lbushi25 Jul 16, 2025
dcac442
Fix offsets in integration header
lbushi25 Jul 16, 2025
257c9c3
Merge branch 'intel:sycl' into struct_contains_special_types
lbushi25 Jul 17, 2025
dff980b
Refine changes
lbushi25 Jul 17, 2025
6b46afd
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Jul 17, 2025
b3e935f
Formatting an comments
lbushi25 Jul 17, 2025
4659ec2
Formatting
lbushi25 Jul 17, 2025
18c185a
More formatting
lbushi25 Jul 17, 2025
9a32eac
More formatting
lbushi25 Jul 17, 2025
60764b6
More formatting
lbushi25 Jul 17, 2025
4056a8a
Remove rogue changes
lbushi25 Jul 17, 2025
f2e21a3
More formatting
lbushi25 Jul 17, 2025
f0e9e1d
Use offsets to access struct member in runtime
lbushi25 Jul 18, 2025
453ca5e
Update SemaSYCL.cpp
lbushi25 Jul 18, 2025
923c949
Apply feedback
lbushi25 Jul 18, 2025
066c41c
Resolve conflict
lbushi25 Jul 18, 2025
a72ff0a
Fix unused parameter errors
lbushi25 Jul 18, 2025
71c8c10
Apply feedback
lbushi25 Jul 18, 2025
77900d8
Finish implementation
lbushi25 Jul 18, 2025
5121d57
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Jul 18, 2025
03bb317
Formatting
lbushi25 Jul 18, 2025
0b0cc86
Improve implementation
lbushi25 Jul 18, 2025
96f6da3
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Jul 18, 2025
ca2310d
Apply more suggestions
lbushi25 Jul 21, 2025
b993149
Improve implementation
lbushi25 Jul 22, 2025
7191b2d
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Jul 23, 2025
1eb1c44
Improve comments
lbushi25 Jul 23, 2025
df84247
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Jul 23, 2025
08c2808
Fix formatting
lbushi25 Jul 23, 2025
b990420
Improve comments further
lbushi25 Jul 23, 2025
eb0925f
Add tests
lbushi25 Jul 31, 2025
6932522
Add tests
lbushi25 Jul 31, 2025
4852cb7
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Jul 31, 2025
2248476
Fix warnings
lbushi25 Jul 31, 2025
f475e4d
Fix more warnings
lbushi25 Jul 31, 2025
f95f7fd
Fix pre-commit failures in test
lbushi25 Jul 31, 2025
891905a
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Aug 5, 2025
3d4259f
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Aug 6, 2025
c7b3696
Address compilation errors
lbushi25 Aug 6, 2025
0a017c1
Update ABI
lbushi25 Aug 6, 2025
de4b02f
Fix pre-commit failures
lbushi25 Aug 6, 2025
b093093
Update free_function_traits.hpp
lbushi25 Aug 7, 2025
1280da0
Update handler.hpp
lbushi25 Aug 7, 2025
cbdf97d
Update handler_impl.hpp
lbushi25 Aug 7, 2025
d2efe98
Formatting
lbushi25 Aug 7, 2025
4fdec2c
Apply initial suggestions
lbushi25 Aug 8, 2025
7f0bf3d
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Aug 8, 2025
f029707
Simplify integration header
lbushi25 Sep 25, 2025
3557c1f
Fix set_arg function
lbushi25 Sep 30, 2025
1dbac89
More refactoring
lbushi25 Sep 30, 2025
bb45df4
Add comments
lbushi25 Sep 30, 2025
a81350c
Add comments
lbushi25 Sep 30, 2025
417533d
[SYCL][ESIMD][E2E] Reenable previously failing tests (#20256)
sarnex Oct 1, 2025
c4be04e
Handle set_arg for accessors
lbushi25 Oct 1, 2025
3946878
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Oct 1, 2025
644b0e9
Formatting
lbushi25 Oct 1, 2025
22eec27
Improve commenting
lbushi25 Oct 1, 2025
def3641
Improve commenting
lbushi25 Oct 1, 2025
fcde60e
Fix merge conflicts
lbushi25 Oct 1, 2025
d7023fe
Merge branch 'intel:sycl' into struct_contains_special_types
lbushi25 Oct 1, 2025
e863838
Remove dead code
lbushi25 Oct 1, 2025
4a41f85
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Oct 1, 2025
a248351
More formatting and some bug fixing
lbushi25 Oct 2, 2025
9323fcc
More formatting
lbushi25 Oct 2, 2025
0d29f6d
Update SemaSYCL.h
lbushi25 Oct 2, 2025
9a50c64
Fix uninitialized pointer
lbushi25 Oct 2, 2025
3cb3c43
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Oct 2, 2025
1f05d39
Address pre-commit failures
lbushi25 Oct 3, 2025
35f87a7
Fix pre-commit failures
lbushi25 Oct 3, 2025
2f80b12
Revert some ABI breaking changes
lbushi25 Oct 6, 2025
50b264d
Add specialization of is_device_copyable in integration header
lbushi25 Oct 6, 2025
5861175
Modify tests to check for the device_copyable trait
lbushi25 Oct 6, 2025
4396bf9
Fix pre-commit failures
lbushi25 Oct 7, 2025
43076a2
Fix more pre-commit failures
lbushi25 Oct 7, 2025
f72f953
Update is_device_copyable.hpp
lbushi25 Oct 7, 2025
46ab7f2
Fix more pre-commit failures
lbushi25 Oct 7, 2025
f6f46d6
Fix merge conflict
lbushi25 Oct 7, 2025
cb43003
Delete clang/test/SemaSYCL/Inputs/sycl/detail/is_device_copyable.hpp
lbushi25 Oct 7, 2025
e973016
Merge branch 'sycl' into struct_contains_special_types
lbushi25 Dec 3, 2025
6763f3b
Resolve pre-commit failures
lbushi25 Dec 3, 2025
a71a745
[E2E][BINDLESS] reenable copy_subregion_2D.cpp (#20678)
cperkinsintel Dec 3, 2025
4561a40
[CI][UR] Bump DPC++ version used in UR workflow (#20781)
lukaszstolarczuk Dec 3, 2025
a476375
[SYCL] Add support for WCL for matrix aspect (#20794)
dkhaldi Dec 3, 2025
2342a56
[UR] Cleanup the record & replay spec (#20806)
kswiecicki Dec 3, 2025
041422f
[CI] Fix cts actions (#20808)
KornevNikita Dec 3, 2025
667c45a
[NFCI][SYCL] Consolidate `[get|create]SyclObj[From]Impl` into `ImplUt…
aelovikov-intel Dec 3, 2025
7f105d1
[SYCL][ABI-break] Remove deprecated variadic printf implementation (#…
againull Dec 3, 2025
7f1b981
Revert "[E2E][BINDLESS] reenable copy_subregion_2D.cpp" (#20819)
sarnex Dec 3, 2025
60981f7
Fix more pre-commit failures
lbushi25 Dec 3, 2025
b4aedf0
[SYCL][ABI-break] Cleanup `get_info` ABI entry points (#20770)
againull Dec 3, 2025
e1f0d50
[SYCL][ABI-break] Cleanup reduction ABI entries (#20815)
againull Dec 4, 2025
894db96
[UR][offload] fix device iteration in offload adapter (#20783)
lplewa Dec 4, 2025
f5c33b1
[SYCL][e2e] Fix buffer.cpp test (#20785)
mateuszpn Dec 4, 2025
27bcab9
[CI] Refactor cleanup of built E2E tests in precommit. (#20790)
maksimsab Dec 4, 2025
f11d979
[LTO] Extend CAS build workaround to LTO (#20814)
sarnex Dec 4, 2025
cb40408
[UR][offload] Add support for Level zero in offload adapter (#20830)
lplewa Dec 4, 2025
89a0525
[SYCL][Graph][Test] Move `host_task_in_order_dependency` to unsupport…
mmichel11 Dec 4, 2025
80da6b6
[Clang][Test] Remove sycl-bc-device-libraries.cpp's dependency on lib…
wenju-he Dec 4, 2025
c254acc
Added `--verbose` in the proper place in `compile.py` (#20825)
fbarbari Dec 4, 2025
fe61680
Bump jws in /lldb/tools/lldb-dap (#20832)
dependabot[bot] Dec 4, 2025
90fbcb1
[SYCL][ABI-break] Promote breaking changes related to code location (…
againull Dec 4, 2025
56a1ca3
[SYCL] Promote breaking changes for logical operations (#20816)
againull Dec 4, 2025
3f39f08
[SYCL][NFC] Remove old unused source file (#20812)
againull Dec 4, 2025
b1a75dd
[SYCL] Implement coverage instrumentation for device code (#20710)
0x12CC Dec 5, 2025
5f3fce6
[SYCL][NFC] Format for program_manager.cpp (#20822)
jinge90 Dec 5, 2025
458ab0c
[UR] Fix arguments of urEnqueueKernelLaunch() in test/fuzz/urFuzz.cpp…
ldorau Dec 5, 2025
9ddd409
[DOC][SPIR-V] Add SPV_INTEL_float4 and SPV_INTEL_fp_conversions exten…
MrSidims Dec 5, 2025
7e25be4
[Benchmarks] Add benchmarks scripts for Torch MultiQueue benchmarks (…
luszczewskakasia1 Dec 5, 2025
24d6ff9
[CI] Update sycl-nightly.yml (#20775)
KornevNikita Dec 5, 2025
3eaabec
[SYCL][ABI-break] Promote `detail::string_view` breaking changes (#20…
againull Dec 5, 2025
29c7b9b
Fix pre-commit errors
lbushi25 Dec 5, 2025
12dba8c
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Dec 5, 2025
e3fb663
Fix typo
lbushi25 Dec 5, 2025
befc6a1
Update Windows ABI symbols
lbushi25 Dec 5, 2025
2819c04
Merge branch 'struct_contains_special_types' of https://github.com/lb…
lbushi25 Dec 5, 2025
a5c6090
Update clang/lib/Sema/SemaSYCL.cpp
lbushi25 Dec 5, 2025
ebce536
Revert "Update Windows ABI symbols"
lbushi25 Dec 5, 2025
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
8 changes: 0 additions & 8 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,6 @@ jobs:
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"

- name: Remove E2E tests before spirv-backend run
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && !cancelled() && steps.build.conclusion == 'success' }}
run: rm -rf build-e2e

- name: Build E2E tests with SPIR-V Backend
if: ${{ inputs.e2e_binaries_spirv_backend_artifact && !cancelled() && steps.build.conclusion == 'success' }}
uses: ./devops/actions/run-tests/e2e
Expand All @@ -354,10 +350,6 @@ jobs:
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param spirv-backend=True

- name: Remove E2E tests before preview-mode run
if: ${{ inputs.e2e_binaries_preview_artifact && !cancelled() && steps.build.conclusion == 'success' }}
run: rm -rf build-e2e

- name: Build E2E tests in Preview Mode
if: ${{ inputs.e2e_binaries_preview_artifact && !cancelled() && steps.build.conclusion == 'success' }}
uses: ./devops/actions/run-tests/e2e
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/sycl-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,23 +222,20 @@ jobs:
fail-fast: false
matrix:
include:
- name: Intel L0 Gen12 GPU
- name: Intel Gen12 GPU
runner: '["Windows", "gen12"]'
target_devices: level_zero:gpu

- name: Intel L0 Arc GPU
- name: Intel Arc GPU
runner: '["Windows", "arc"]'
target_devices: level_zero:gpu

- name: Intel L0 Battlemage GPU
- name: Intel Battlemage GPU
runner: '["Windows", "bmg"]'
target_devices: level_zero:gpu

uses: ./.github/workflows/sycl-windows-run-tests.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
target_devices: ${{ matrix.target_devices }}
target_devices: level_zero:gpu
toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }}

cuda-aws-start:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ur-build-hw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:

- name: Download DPC++
run: |
wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2025-11-28/sycl_linux.tar.gz
mkdir -p dpcpp_compiler
tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler

Expand Down
9 changes: 6 additions & 3 deletions buildbot/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ def do_compile(args):
"cmake",
"--build",
abs_obj_dir,
]

if args.verbose:
cmake_cmd.append("--verbose")

cmake_cmd += [
"--",
args.build_target,
"-j",
str(cpu_count),
]

if args.verbose:
cmake_cmd.append("--verbose")

print("[Cmake Command]: {}".format(" ".join(cmake_cmd)))

subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
Expand Down
2 changes: 1 addition & 1 deletion buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def do_configure(args, passthrough_args):
if not os.path.isdir(abs_obj_dir):
os.makedirs(abs_obj_dir)

llvm_external_projects = "sycl;llvm-spirv;opencl;xpti;xptifw"
llvm_external_projects = "sycl;llvm-spirv;opencl;xpti;xptifw;compiler-rt"

# libdevice build requires a working SYCL toolchain, which is not the case
# with macOS target right now.
Expand Down
31 changes: 30 additions & 1 deletion clang/include/clang/Sema/SemaSYCL.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class SYCLIntegrationHeader {
kind_work_group_memory,
kind_dynamic_work_group_memory,
kind_dynamic_accessor,
kind_last = kind_dynamic_accessor
kind_struct_with_special_type, // structs that contain special types
kind_last = kind_struct_with_special_type
};

public:
Expand Down Expand Up @@ -118,6 +119,9 @@ class SYCLIntegrationHeader {
/// integration header is required.
void addHostPipeRegistration() { NeedToEmitHostPipeRegistration = true; }

/// Set the ParentStruct field
void setParentStruct(ParmVarDecl *parent);

private:
// Kernel actual parameter descriptor.
struct KernelParamDesc {
Expand Down Expand Up @@ -205,6 +209,20 @@ class SYCLIntegrationHeader {
/// Keeps track of whether declaration of __sycl_host_pipe_registration
/// type and __sycl_host_pipe_registrar variable are required to emit.
bool NeedToEmitHostPipeRegistration = false;

// For free function kernels, keeps track of the parameter that is currently
// being analyzed if it is a struct that contains special types.
ParmVarDecl *ParentStruct = nullptr;

// For every struct that contains a special type which is given by
// the ParentStruct field above, record the offset and size of its fields
// at any nesting level. Store the information in the variable below.
llvm::DenseMap<ParmVarDecl *, llvm::SmallVector<std::pair<size_t, size_t>>>
OffsetSizeInfo;
// Likewise for the kind of a field i.e accessor, std_layout etc...
llvm::DenseMap<ParmVarDecl *,
llvm::SmallVector<SYCLIntegrationHeader::kernel_param_kind_t>>
KindInfo;
};

class SYCLIntegrationFooter {
Expand Down Expand Up @@ -267,6 +285,10 @@ class SemaSYCL : public SemaBase {

llvm::DenseSet<const FunctionDecl *> FreeFunctionDeclarations;

// A map that keeps track of all structs encountered with
// special types inside. Relevant for free function kernels only.
llvm::DenseSet<const RecordDecl *> StructsWithSpecialTypes;

public:
SemaSYCL(Sema &S);

Expand Down Expand Up @@ -317,6 +339,13 @@ class SemaSYCL : public SemaBase {
SYCLKernelFunctions.insert(FD);
}

/// Add ParentStruct to StructsWithSpecialTypes.
void addStructWithSpecialType(const RecordDecl *ParentStruct) {
StructsWithSpecialTypes.insert(ParentStruct);
}

auto &getStructsWithSpecialType() const { return StructsWithSpecialTypes; }

/// Lazily creates and returns SYCL integration header instance.
SYCLIntegrationHeader &getSyclIntegrationHeader() {
if (SyclIntHeader == nullptr)
Expand Down
3 changes: 3 additions & 0 deletions clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
PB.registerPipelineStartEPCallback(
[Options](ModulePassManager &MPM, OptimizationLevel Level) {
MPM.addPass(InstrProfilingLoweringPass(*Options, false));
// The profiling pass adds SYCL device globals so we need to run
// the compile-time properties pass to update the metadata.
MPM.addPass(CompileTimePropertiesPass());
});

// TODO: Consider passing the MemoryProfileOutput to the pass builder via
Expand Down
3 changes: 3 additions & 0 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5423,6 +5423,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-fsycl-is-device");
CmdArgs.push_back("-fdeclare-spirv-builtins");

// Set the atomic profile update flag to increment counters atomically.
CmdArgs.push_back("-fprofile-update=atomic");

// Set O2 optimization level by default
if (!Args.getLastArg(options::OPT_O_Group))
CmdArgs.push_back("-O2");
Expand Down
6 changes: 1 addition & 5 deletions clang/lib/Driver/ToolChains/SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,11 +1371,7 @@ static ArrayRef<options::ID> getUnsupportedOpts() {
options::OPT_fno_profile_generate, // -f[no-]profile-generate
options::OPT_ftest_coverage,
options::OPT_fno_test_coverage, // -f[no-]test-coverage
options::OPT_fcoverage_mapping,
options::OPT_coverage, // --coverage
options::OPT_fno_coverage_mapping, // -f[no-]coverage-mapping
options::OPT_fprofile_instr_generate,
options::OPT_fprofile_instr_generate_EQ,
options::OPT_coverage, // --coverage
options::OPT_fprofile_arcs,
options::OPT_fno_profile_arcs, // -f[no-]profile-arcs
options::OPT_fno_profile_instr_generate, // -f[no-]profile-instr-generate
Expand Down
Loading
Loading