-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][FPGA] Implement task_sequence header, properties, and add new …
…fpga_cluster kernel property (#12453) Implement task_sequence header, task_sequence properties, and fpga_cluster kernel property according to the spec updates #6348 (almost ready to be merged) Header - Refactor invocation and response capacity to be on the Create intrinsic, so Async and Get do not take in respective argument - Remove max_outstanding argument of Create intrinsic - Add pipelined and fpga_cluster arguments to Create intrinsic - Async, Get, and Release intrinsic now accept the TargetExtType target("spirv.TaskSequenceINTEL") returned from the Create intrinsic, and do not take in object pointer or task function pointer arguments - Task Sequence accepts properties Task Sequence Properties - Convert invocation and response capacity from template parameters to properties - Add balanced property to remove Get intrinsic loop in destructor FPGA Kernel properties - Add fpga_cluster property - Support fpga_cluster and pipelined property for task sequence
- Loading branch information
1 parent
2525570
commit 7b9001e
Showing
32 changed files
with
1,206 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %clang_cc1 -triple spir64-unknown-unknown -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s | ||
|
||
// Test that SPIR-V codegen generates the expected LLVM struct name for the | ||
// TaskSequenceINTEL type | ||
|
||
namespace __spv { | ||
struct __spirv_TaskSequenceINTEL; | ||
} // namespace __spv | ||
|
||
// CHECK: @_Z4func{{.*}}(target("spirv.TaskSequenceINTEL") | ||
void func(__spv::__spirv_TaskSequenceINTEL *task_seq) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
llvm/test/SYCLLowerIR/CompileTimePropertiesPass/kernel-attributes/fpga-cluster.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; Check conversion of sycl-fpga-cluster attribute | ||
; RUN: opt -passes="compile-time-properties" %s -S -o - | FileCheck %s --check-prefix CHECK-IR | ||
|
||
; CHECK-IR-DAG: @stallFree() #0 {{.*}}!stall_free [[MD_TRUE:![0-9]+]] { | ||
; Function Attrs: convergent norecurse | ||
define weak_odr dso_local spir_kernel void @stallFree() #0 { | ||
entry: | ||
ret void | ||
} | ||
|
||
; CHECK-IR-DAG: @stallEnable() #1 {{.*}}!stall_enable [[MD_TRUE:![0-9]+]] { | ||
; Function Attrs: convergent norecurse | ||
define weak_odr dso_local spir_kernel void @stallEnable() #1 { | ||
entry: | ||
ret void | ||
} | ||
|
||
attributes #0 = { convergent norecurse "frame-pointer"="all" "sycl-fpga-cluster"="0" } | ||
attributes #1 = { convergent norecurse "frame-pointer"="all" "sycl-fpga-cluster"="1" } | ||
|
||
!opencl.spir.version = !{!0, !0, !0, !0, !0, !0, !0, !0, !0, !0, !0} | ||
!spirv.Source = !{!1, !1, !1, !1, !1, !1, !1, !1, !1, !1, !1} | ||
!llvm.ident = !{!2, !2, !2, !2, !2, !2, !2, !2, !2, !2, !2} | ||
!llvm.module.flags = !{!3, !4} | ||
|
||
!0 = !{i32 1, i32 2} | ||
!1 = !{i32 4, i32 100000} | ||
!2 = !{!"clang version 13.0.0 (https://github.com/intel/llvm)"} | ||
!3 = !{i32 1, !"wchar_size", i32 4} | ||
!4 = !{i32 7, !"frame-pointer", i32 2} | ||
|
||
; Confirm the decorations for the functions | ||
; CHECK-IR-DAG: [[MD_TRUE]] = !{i32 1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.