Skip to content

Commit 5cacbfc

Browse files
committed
enabled sync statement to use ATMI
1 parent 8aab0e7 commit 5cacbfc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/AST/build.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2933,7 +2933,11 @@ buildSyncStmt(Expr* stmt) {
29332933
block->insertAtTail(new CallExpr(PRIM_MOVE, endCountSave, new CallExpr(PRIM_GET_END_COUNT)));
29342934
block->insertAtTail(new CallExpr(PRIM_SET_END_COUNT, new CallExpr("_endCountAlloc", /* forceLocalTypes= */gFalse)));
29352935
block->insertAtTail(stmt);
2936+
#ifndef TARGET_HSA
29362937
block->insertAtTail(new CallExpr("_waitEndCount"));
2938+
#else
2939+
block->insertAtTail(new CallExpr("_finalizeTaskGroup"));
2940+
#endif
29372941
block->insertAtTail(new CallExpr("_endCountFree", new CallExpr(PRIM_GET_END_COUNT)));
29382942
block->insertAtTail(new CallExpr(PRIM_SET_END_COUNT, endCountSave));
29392943
return block;

0 commit comments

Comments
 (0)