[HIPIFY] Narrow cudaKernelCallExpr matcher.
[Explanation]
Narrow cudaKernelCallExpr matcher to isExpansionInMainFile() - to the file being actually converted (without system includes).
But as for Thrust, there are *.inl files, which are nevertheless being expanded in main file.
These files contain cuda kernel launches, which are not converted successfully by hipify, for instance:
thrust/system/cuda/detail/detail/launch_closure.inl:98:23.
[ToDo]
File a bug on cudaKernelCallExpr matcher for conversion error (thrust\examples\cuda\<any cu example>).
[ROCm/hip commit: d1cfcf55f1]
This commit is contained in:
@@ -2494,7 +2494,7 @@ void addAllMatchers(ast_matchers::MatchFinder &Finder, Cuda2HipCallback *Callbac
|
||||
callee(functionDecl(matchesName("cu.*"))))
|
||||
.bind("cudaCall"),
|
||||
Callback);
|
||||
Finder.addMatcher(cudaKernelCallExpr().bind("cudaLaunchKernel"), Callback);
|
||||
Finder.addMatcher(cudaKernelCallExpr(isExpansionInMainFile()).bind("cudaLaunchKernel"), Callback);
|
||||
Finder.addMatcher(memberExpr(isExpansionInMainFile(),
|
||||
hasObjectExpression(hasType(cxxRecordDecl(
|
||||
matchesName("__cuda_builtin_")))))
|
||||
|
||||
Reference in New Issue
Block a user