This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Commit 7c4a22e
committed
Move sync from for_each to parallel_for to fix CDP usages.
The device synchronization was decoupled from `THRUST_CDP_DISPATCH`
and was trying to sync regardless of CDP state. This led to
device syncs being invoked from device code when CDP is disabled
and the thread-serial implementation was used.
Some other algorithms that are implemented with `parallel_for`
have also been updated.
Old behavior:
1. `for_each`: calls `parallel_for`
2. `parallel_for`: calls appropriate impl using `THRUST_CDP_DISPATCH`
3. `parallel_for`: returns
4. `for_each`: calls `cub::detail::device_synchronize`
New behavior:
1. `for_each`: calls `parallel_for`
2. `parallel_for`: calls appropriate impl using `THRUST_CDP_DISPATCH`
4. `parallel_for`: calls `cub::detail::device_synchronize`
3. `parallel_for`: returns1 parent 4a2da40 commit 7c4a22e
File tree
8 files changed
+3
-41
lines changed- thrust/system/cuda/detail
8 files changed
+3
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 84 | | |
90 | 85 | | |
91 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 95 | | |
101 | 96 | | |
102 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 235 | | |
241 | 236 | | |
242 | 237 | | |
| |||
278 | 273 | | |
279 | 274 | | |
280 | 275 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 276 | | |
287 | 277 | | |
288 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
| |||
0 commit comments