|
21 | 21 | #include <unistd.h>
|
22 | 22 | #include <unordered_map>
|
23 | 23 |
|
| 24 | +#include "OmptCommonDefs.h" |
| 25 | + |
24 | 26 | #include "Shared/Debug.h"
|
25 | 27 | #include "Shared/Environment.h"
|
26 | 28 | #include "Shared/Utils.h"
|
@@ -3121,7 +3123,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
|
3121 | 3123 |
|
3122 | 3124 | // For large transfers use synchronous behavior.
|
3123 | 3125 | // If OMPT is enabled or synchronous behavior is explicitly requested:
|
3124 |
| - if (ompt::TracingActive || OMPX_ForceSyncRegions || |
| 3126 | + if (OMPT_IF_BUILT(ompt::TracingActive ||) OMPX_ForceSyncRegions || |
3125 | 3127 | Size >= OMPX_MaxAsyncCopyBytes) {
|
3126 | 3128 | if (AsyncInfoWrapper.hasQueue())
|
3127 | 3129 | if (auto Err = synchronize(AsyncInfoWrapper))
|
@@ -3194,7 +3196,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
|
3194 | 3196 |
|
3195 | 3197 | // For large transfers use synchronous behavior.
|
3196 | 3198 | // If OMPT is enabled or synchronous behavior is explicitly requested:
|
3197 |
| - if (ompt::TracingActive || OMPX_ForceSyncRegions || |
| 3199 | + if (OMPT_IF_BUILT(ompt::TracingActive ||) OMPX_ForceSyncRegions || |
3198 | 3200 | Size >= OMPX_MaxAsyncCopyBytes) {
|
3199 | 3201 | if (AsyncInfoWrapper.hasQueue())
|
3200 | 3202 | if (auto Err = synchronize(AsyncInfoWrapper))
|
@@ -3249,7 +3251,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
|
3249 | 3251 |
|
3250 | 3252 | // For large transfers use synchronous behavior.
|
3251 | 3253 | // If OMPT is enabled or synchronous behavior is explicitly requested:
|
3252 |
| - if (ompt::TracingActive || OMPX_ForceSyncRegions || |
| 3254 | + if (OMPT_IF_BUILT(ompt::TracingActive ||) OMPX_ForceSyncRegions || |
3253 | 3255 | Size >= OMPX_MaxAsyncCopyBytes) {
|
3254 | 3256 | if (AsyncInfoWrapper.hasQueue())
|
3255 | 3257 | if (auto Err = synchronize(AsyncInfoWrapper))
|
|
0 commit comments