Skip to content

[SYCL][NFC] Add additional test case to emit_program_metadata #7135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
10 changes: 9 additions & 1 deletion llvm/test/tools/sycl-post-link/emit_program_metadata.ll
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
; This test checks that the post-link tool generates SYCL program metadata.
;
; RUN: sycl-post-link -emit-program-metadata -S %s -o %t.files.table
; RUN: sycl-post-link -emit-program-metadata -device-globals -S %s -o %t.files.table
; RUN: FileCheck %s -input-file=%t.files.table --check-prefixes CHECK-TABLE
; RUN: FileCheck %s -input-file=%t.files_0.prop --match-full-lines --check-prefixes CHECK-PROP

target triple = "spir64-unknown-unknown"

attributes #0 = { "sycl-work-group-size"="4,2,1" }

!0 = !{i32 1, i32 2, i32 4}

define weak_odr spir_kernel void @SpirKernel1(float %arg1) !reqd_work_group_size !0 {
call void @foo(float %arg1)
ret void
}

define weak_odr spir_kernel void @SpirKernel2(float %arg1) #0 {
call void @foo(float %arg1)
ret void
}

declare void @foo(float)

; CHECK-PROP: [SYCL/program metadata]
; // Base64 encoding in the prop file (including 8 bytes length):
; CHECK-PROP-NEXT: SpirKernel1@reqd_work_group_size=2|gBAAAAAAAAQAAAAACAAAAQAAAAA
; CHECK-PROP-NEXT: SpirKernel2@reqd_work_group_size=2|gBAAAAAAAAQAAAAACAAAAQAAAAA

; CHECK-TABLE: [Code|Properties]
; CHECK-TABLE-NEXT: {{.*}}files_0.prop
Expand Down