Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
; RUN: FileCheck %s -input-file=%t.table
; RUN: FileCheck %s -input-file=%t_0.ll --check-prefixes CHECK-SYCL-IR
; RUN: FileCheck %s -input-file=%t_esimd_0.ll --check-prefixes CHECK-ESIMD-IR
; RUN: FileCheck %s -input-file=%t_0.prop --check-prefixes CHECK-SYCL-PROP
; RUN: FileCheck %s -input-file=%t_esimd_0.prop --check-prefixes CHECK-ESIMD-PROP

; This is basic test of splitting SYCL and ESIMD kernels into separate
; modules.
; This is basic test of splitting SYCL and ESIMD kernels into separate modules.
; ESIMD module should have isEsimdImage=1 property set after splitting.

target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir64-unknown-linux-sycldevice"
Expand Down Expand Up @@ -41,5 +43,10 @@ attributes #0 = { "sycl-module-id"="a.cpp" }
; CHECK-SYCL-IR-DAG: define dso_local spir_kernel void @SYCL_kernel()
; CHECK-SYCL-IR-DAG: declare dso_local spir_func i64 @_Z28__spirv_GlobalInvocationId_xv()

; CHECK-SYCL-PROP-NOT: isEsimdImage=1|1

; CHECK-ESIMD-IR-DAG: define dso_local spir_kernel void @ESIMD_kernel()
; CHECK-ESIMD-IR-DAG: declare dso_local spir_func i64 @_Z28__spirv_GlobalInvocationId_xv()

; CHECK-ESIMD-PROP: [SYCL/misc properties]
; CHECK-ESIMD-PROP: isEsimdImage=1|1
6 changes: 6 additions & 0 deletions llvm/tools/sycl-post-link/sycl-post-link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,12 @@ static string_vector saveDeviceImageProperty(
NameInfoPair.first, llvm::util::PropertyValue(Data, DataBitSize)));
}
}

if (ImgPSInfo.IsEsimdKernel) {
PropSet[llvm::util::PropertySetRegistry::SYCL_MISC_PROP].insert(
{"isEsimdImage", true});
}

std::error_code EC;
std::string SCFile =
makeResultFileName(".prop", I, ImgPSInfo.IsEsimdKernel ? "esimd_" : "");
Expand Down