2
2
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PI_TRACE=2 %t.out separate affinity %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-SEPARATE
3
3
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PI_TRACE=2 %t.out shared affinity %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-SHARED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate
4
4
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PI_TRACE=2 %t.out fused affinity %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-FUSED --implicit-check-not piContextCreate --implicit-check-not piMemBufferCreate
5
- //
6
- // Intel OpenCL CPU Runtime supports device partition on all (multi-core)
7
- // platforms. Other devices may not support this.
8
5
9
6
#include < CL/sycl.hpp>
10
7
#include < string>
@@ -52,7 +49,7 @@ static bool check_separate(device dev, buffer<int, 1> buf,
52
49
53
50
log_pi (" Create sub sub devices of sub device 0" );
54
51
std::vector<device> subsubdevices = partition (subdevices[0 ]);
55
- assert (subsubdevices.size () >= 1 );
52
+ assert (subsubdevices.size () > 1 );
56
53
// CHECK-SEPARATE: Create sub sub devices of sub device 0
57
54
// CHECK-SEPARATE: ---> piDevicePartition
58
55
@@ -81,7 +78,7 @@ static bool check_shared_context(device dev, buffer<int, 1> buf,
81
78
82
79
log_pi (" Create sub sub devices of sub device 0" );
83
80
std::vector<device> subsubdevices = partition (subdevices[0 ]);
84
- assert (subsubdevices.size () >= 1 );
81
+ assert (subsubdevices.size () > 1 );
85
82
// CHECK-SHARED: Create sub sub devices of sub device 0
86
83
// CHECK-SHARED: ---> piDevicePartition
87
84
@@ -96,8 +93,8 @@ static bool check_shared_context(device dev, buffer<int, 1> buf,
96
93
97
94
log_pi (" Test sub sub device 0" );
98
95
{
99
- queue q0 (shared_context, subsubdevices[0 ]);
100
- use_mem (buf, q0 );
96
+ queue q (shared_context, subsubdevices[0 ]);
97
+ use_mem (buf, q );
101
98
}
102
99
// CHECK-SHARED: Test sub sub device 0
103
100
// CHECK-SHARED: ---> piQueueCreate
@@ -107,7 +104,18 @@ static bool check_shared_context(device dev, buffer<int, 1> buf,
107
104
// see --implicit-check-not above.
108
105
//
109
106
// CHECK-SHARED: ---> piEnqueueKernelLaunch
110
- // CHECK-SHARED: ---> piEventsWait
107
+ // CHECK-SHARED: ---> piQueueFinish
108
+
109
+ log_pi (" Test sub sub device 1" );
110
+ {
111
+ queue q1 (shared_context, subsubdevices[1 ]);
112
+ use_mem (buf, q1);
113
+ }
114
+ // CHECK-SHARED: Test sub sub device 1
115
+ // CHECK-SHARED: ---> piQueueCreate
116
+ // CHECK-SHARED: ---> piEnqueueKernelLaunch
117
+ // CHECK-SHARED: ---> piQueueFinish
118
+ // CHECK-SHARED: ---> piEnqueueMemBufferRead
111
119
112
120
return true ;
113
121
}
@@ -122,7 +130,7 @@ static bool check_fused_context(device dev, buffer<int, 1> buf,
122
130
123
131
log_pi (" Create sub sub devices of sub device 0" );
124
132
std::vector<device> subsubdevices = partition (subdevices[0 ]);
125
- assert (subsubdevices.size () >= 1 );
133
+ assert (subsubdevices.size () > 1 );
126
134
// CHECK-FUSED: Create sub sub devices of sub device 0
127
135
// CHECK-FUSED: ---> piDevicePartition
128
136
0 commit comments