Skip to content

Commit 3090feb

Browse files
Cleaned up comments and changed the rule name
1 parent 9da9560 commit 3090feb

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

clang/lib/DPCT/ASTTraversal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ REGISTER_RULE(CuDNNAPIRule, PassKind::PK_Migration, RuleGroupKind::RK_DNN)
198198

199199
REGISTER_RULE(NVSHMEMRule, PassKind::PK_Migration, RuleGroupKind::RK_NVSHMEM)
200200

201-
REGISTER_RULE(CUTENSORRule, PassKind::PK_Migration, RuleGroupKind::RK_CUTENSOR)
201+
REGISTER_RULE(CUTensorRule, PassKind::PK_Migration, RuleGroupKind::RK_CUTENSOR)
202202

203203
} // namespace dpct
204204
} // namespace clang

clang/lib/DPCT/RulesTensor/CUTENSORAPIMigration.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using namespace clang::dpct;
1313
using namespace clang::ast_matchers;
1414

15-
void clang::dpct::CUTENSORRule::registerMatcher(ast_matchers::MatchFinder &MF) {
15+
void clang::dpct::CUTensorRule::registerMatcher(ast_matchers::MatchFinder &MF) {
1616
auto CutensorAPIs = [&]() {
1717
return hasAnyName(
1818
// Helper Functions
@@ -57,15 +57,12 @@ void clang::dpct::CUTENSORRule::registerMatcher(ast_matchers::MatchFinder &MF) {
5757
"cutensorMgDestroyContractionPlan", "cutensorMgContraction");
5858
};
5959

60-
llvm::outs() << "[DEBUG] Inside regMatcher\n";
61-
6260
MF.addMatcher(callExpr(callee(functionDecl(CutensorAPIs()))).bind("call"),
6361
this);
6462
}
6563

66-
void clang::dpct::CUTENSORRule::runRule(
64+
void clang::dpct::CUTensorRule::runRule(
6765
const ast_matchers::MatchFinder::MatchResult &Result) {
68-
llvm::outs() << "[DEBUG] Inside runRule\n";
6966
if (const CallExpr *CE = getNodeAsType<CallExpr>(Result, "call")) {
7067
std::string FuncName = "";
7168
const FunctionDecl *FD = CE->getDirectCallee();

clang/lib/DPCT/RulesTensor/CUTENSORAPIMigration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace clang::ast_matchers;
1616
namespace clang {
1717
namespace dpct {
1818

19-
class CUTENSORRule : public NamedMigrationRule<CUTENSORRule> {
19+
class CUTensorRule : public NamedMigrationRule<CUTensorRule> {
2020
public:
2121
void registerMatcher(ast_matchers::MatchFinder &MF) override;
2222
void runRule(const ast_matchers::MatchFinder::MatchResult &Result);

0 commit comments

Comments
 (0)