@@ -24,81 +24,73 @@ namespace oneapi = sycl::ext::oneapi::experimental; // for properties
24
24
// CHECK: [[MaxPrivateCopiesINTEL:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5829:\223\22}\00"
25
25
// CHECK: [[MaxReplicatesINTEL:@.*]] = private unnamed_addr addrspace(1) constant [27 x i8] c"{5826:\22DEFAULT\22}{5832:\225\22}\00"
26
26
27
- int main () {
28
- queue Q;
27
+ SYCL_EXTERNAL void fpga_mem_local () {
29
28
int f = 5 ;
29
+ intel::fpga_mem<int [10 ]> empty;
30
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL]]
31
+ // CHECK-NOT: call void @llvm.memset
32
+ intel::fpga_mem<int [10 ],
33
+ decltype (oneapi::properties (intel::ram_stitching_min_ram))>
34
+ min_ram;
35
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[ForcePow2DepthINTEL_FALSE]]
36
+ // CHECK-NOT: call void @llvm.memset
37
+ intel::fpga_mem<int [10 ],
38
+ decltype (oneapi::properties (intel::ram_stitching_max_fmax))>
39
+ max_fmax;
40
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[ForcePow2DepthINTEL_TRUE]]
41
+ // CHECK-NOT: call void @llvm.memset
42
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::clock_2x_true))>
43
+ double_pumped;
44
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[DoublepumpINTEL]]
45
+ // CHECK-NOT: call void @llvm.memset
46
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::clock_2x_false))>
47
+ single_pumped;
48
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[SinglepumpINTEL]]
49
+ // CHECK-NOT: call void @llvm.memset
50
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::resource_mlab))>
51
+ mlab;
52
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL_mlab]]
53
+ // CHECK-NOT: call void @llvm.memset
54
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (
55
+ intel::bi_directional_ports_false))>
56
+ simple_dual_port;
57
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[SimpleDualPortINTEL]]
58
+ // CHECK-NOT: call void @llvm.memset
59
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (
60
+ intel::bi_directional_ports_true))>
61
+ true_dual_port;
62
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[TrueDualPortINTEL]]
63
+ // CHECK-NOT: call void @llvm.memset
64
+ intel::fpga_mem<int [10 ],
65
+ decltype (oneapi::properties (intel::resource_block_ram))>
66
+ block_ram;
67
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL_block_ram]]
68
+ // CHECK-NOT: call void @llvm.memset
69
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::num_banks<4 >))>
70
+ banks;
71
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[NumbanksINTEL]]
72
+ // CHECK-NOT: call void @llvm.memset
73
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::stride_size<2 >))>
74
+ stride;
75
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[StridesizeINTEL]]
76
+ // CHECK-NOT: call void @llvm.memset
77
+ intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::word_size<8 >))>
78
+ word;
79
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[WordsizeINTEL]]
80
+ // CHECK-NOT: call void @llvm.memset
81
+ intel::fpga_mem<int [10 ],
82
+ decltype (oneapi::properties (intel::max_private_copies<3 >))>
83
+ copies;
84
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MaxPrivateCopiesINTEL]]
85
+ // CHECK-NOT: call void @llvm.memset
86
+ intel::fpga_mem<int [10 ],
87
+ decltype (oneapi::properties (intel::num_replicates<5 >))>
88
+ replicates;
89
+ // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MaxReplicatesINTEL]]
90
+ // CHECK-NOT: call void @llvm.memset
30
91
31
- Q.single_task ([=]() {
32
- intel::fpga_mem<int [10 ]> empty;
33
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL]]
34
- // CHECK-NOT: call void @llvm.memset
35
- intel::fpga_mem<int [10 ],
36
- decltype (oneapi::properties (intel::ram_stitching_min_ram))>
37
- min_ram;
38
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[ForcePow2DepthINTEL_FALSE]]
39
- // CHECK-NOT: call void @llvm.memset
40
- intel::fpga_mem<int [10 ],
41
- decltype (oneapi::properties (intel::ram_stitching_max_fmax))>
42
- max_fmax;
43
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[ForcePow2DepthINTEL_TRUE]]
44
- // CHECK-NOT: call void @llvm.memset
45
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::clock_2x_true))>
46
- double_pumped;
47
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[DoublepumpINTEL]]
48
- // CHECK-NOT: call void @llvm.memset
49
- intel::fpga_mem<int [10 ],
50
- decltype (oneapi::properties (intel::clock_2x_false))>
51
- single_pumped;
52
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[SinglepumpINTEL]]
53
- // CHECK-NOT: call void @llvm.memset
54
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::resource_mlab))>
55
- mlab;
56
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL_mlab]]
57
- // CHECK-NOT: call void @llvm.memset
58
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (
59
- intel::bi_directional_ports_false))>
60
- simple_dual_port;
61
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[SimpleDualPortINTEL]]
62
- // CHECK-NOT: call void @llvm.memset
63
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (
64
- intel::bi_directional_ports_true))>
65
- true_dual_port;
66
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[TrueDualPortINTEL]]
67
- // CHECK-NOT: call void @llvm.memset
68
- intel::fpga_mem<int [10 ],
69
- decltype (oneapi::properties (intel::resource_block_ram))>
70
- block_ram;
71
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MemoryINTEL_block_ram]]
72
- // CHECK-NOT: call void @llvm.memset
73
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::num_banks<4 >))>
74
- banks;
75
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[NumbanksINTEL]]
76
- // CHECK-NOT: call void @llvm.memset
77
- intel::fpga_mem<int [10 ],
78
- decltype (oneapi::properties (intel::stride_size<2 >))>
79
- stride;
80
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[StridesizeINTEL]]
81
- // CHECK-NOT: call void @llvm.memset
82
- intel::fpga_mem<int [10 ], decltype (oneapi::properties (intel::word_size<8 >))>
83
- word;
84
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[WordsizeINTEL]]
85
- // CHECK-NOT: call void @llvm.memset
86
- intel::fpga_mem<int [10 ],
87
- decltype (oneapi::properties (intel::max_private_copies<3 >))>
88
- copies;
89
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MaxPrivateCopiesINTEL]]
90
- // CHECK-NOT: call void @llvm.memset
91
- intel::fpga_mem<int [10 ],
92
- decltype (oneapi::properties (intel::num_replicates<5 >))>
93
- replicates;
94
- // CHECK: @llvm.ptr.annotation{{.*}}(ptr addrspace(4) {{.*}}, ptr addrspace(1) [[MaxReplicatesINTEL]]
95
- // CHECK-NOT: call void @llvm.memset
96
-
97
- volatile int ReadVal = empty[f] + min_ram[f] + max_fmax[f] +
98
- double_pumped[f] + single_pumped[f] + mlab[f] +
99
- simple_dual_port[f] + true_dual_port[f] +
100
- block_ram[f] + banks[f] + stride[f] + word[f] +
101
- copies[f] + replicates[f];
102
- });
103
- return 0 ;
92
+ volatile int ReadVal =
93
+ empty[f] + min_ram[f] + max_fmax[f] + double_pumped[f] +
94
+ single_pumped[f] + mlab[f] + simple_dual_port[f] + true_dual_port[f] +
95
+ block_ram[f] + banks[f] + stride[f] + word[f] + copies[f] + replicates[f];
104
96
}
0 commit comments