-
Notifications
You must be signed in to change notification settings - Fork 750
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
[SPIR-V] Reland entry point patches #14450
base: sycl
Are you sure you want to change the base?
Changes from 4 commits
86aa271
f5f4cc5
a074d36
73d74e4
b3dbb52
a8d747e
8cc91fc
f44cbff
2edb43d
a3203cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
;; Test to check that an LLVM spir_kernel gets translated into an | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test looks a bit different in the upstream Khronos Translator. Can you please check? Thanks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems that it was the initial version of the test. That led to the thing that we did not apply the changes from the following commit. Will update the test, thanks for the catch! |
||
;; Entrypoint wrapper and Function with LinkageAttributes | ||
; RUN: llvm-as %s -o %t.bc | ||
; RUN: llvm-spirv %t.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPIRV | ||
; RUN: llvm-spirv %t.bc -o %t.spv | ||
; RUN: spirv-val %t.spv | ||
|
||
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" | ||
target triple = "spir64-unknown-unknown" | ||
|
||
define spir_kernel void @testfunction() { | ||
ret void | ||
} | ||
|
||
; Check there is an entrypoint and a function produced. | ||
; CHECK-SPIRV: EntryPoint 6 [[EP:[0-9]+]] "testfunction" | ||
; CHECK-SPIRV: Name [[FUNC:[0-9]+]] "testfunction" | ||
; CHECK-SPIRV: Decorate [[FUNC]] LinkageAttributes "testfunction" Export | ||
; CHECK-SPIRV: Function 2 [[FUNC]] 0 3 | ||
; CHECK-SPIRV: Function 2 [[EP]] 0 3 | ||
; CHECK-SPIRV: FunctionCall 2 8 [[FUNC]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor Nit: Can you please add this three lines earlier to align with upstream translator?
Thanks