File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -6113,9 +6113,14 @@ void KernelCallExpr::addAccessorDecl() {
6113
6113
Tex.second ->addDecl (OuterStmts.InitList , SubmitStmts.TextureList ,
6114
6114
SubmitStmts.SamplerList , getQueueStr ());
6115
6115
}
6116
- for (auto &Tmp : VM.getTempStorageMap ()) {
6117
- Tmp.second ->addAccessorDecl (SubmitStmts.AccessorList ,
6118
- ExecutionConfig.LocalSize );
6116
+ if (!VM.getTempStorageMap ().empty ()) {
6117
+ DpctGlobalInfo::getInstance ()
6118
+ .insertFile (getFilePath ())
6119
+ ->insertHeader (HT_DPCT_GROUP_Utils, RT_ForSYCLMigration);
6120
+ for (auto &Tmp : VM.getTempStorageMap ()) {
6121
+ Tmp.second ->addAccessorDecl (SubmitStmts.AccessorList ,
6122
+ ExecutionConfig.LocalSize );
6123
+ }
6119
6124
}
6120
6125
}
6121
6126
void KernelCallExpr::buildInfo () {
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ void CubMemberCallRule::runRule(
247
247
if (const auto *BlockMC =
248
248
getNodeAsType<CXXMemberCallExpr>(Result, " memberCall" )) {
249
249
EA.analyze (BlockMC);
250
+ emplaceTransformation (EA.getReplacement ());
251
+ EA.applyAllSubExprRepl ();
252
+
250
253
StringRef Name = BlockMC->getMethodDecl ()->getName ();
251
254
bool isBlockRadixSort = Name == " Sort" || Name == " SortDescending" ||
252
255
Name == " SortBlockedToStriped" ||
@@ -343,9 +346,9 @@ void CubMemberCallRule::runRule(
343
346
}
344
347
} else if (const auto *E2 = getNodeAsType<MemberExpr>(Result, " memberExpr" )) {
345
348
EA.analyze (E2 );
349
+ emplaceTransformation (EA.getReplacement ());
350
+ EA.applyAllSubExprRepl ();
346
351
}
347
- emplaceTransformation (EA.getReplacement ());
348
- EA.applyAllSubExprRepl ();
349
352
}
350
353
351
354
void CubIntrinsicRule::registerMatcher (ast_matchers::MatchFinder &MF) {
Original file line number Diff line number Diff line change 6
6
// RUN: %if build_lit %{icpx -c -fsycl %T/blocklevel/blockload/blockload.dp.cpp -o %T/blocklevel/blockload/blockload.dp.o %}
7
7
8
8
#include < cub/cub.cuh>
9
-
9
+ // CHECK: #include <dpct/group_utils.hpp>
10
10
__global__ void DirectKernel (int *d_data, int valid_items, int default_value) {
11
11
int thread_data[4 ] = {0 };
12
12
// CHECK: dpct::group::load_direct_blocked(item_ct1, d_data, thread_data);
You can’t perform that action at this time.
0 commit comments