diff --git a/enzyme/tools/enzyme-tblgen/blasDeclUpdater.h b/enzyme/tools/enzyme-tblgen/blasDeclUpdater.h index 8c4a7a5eaf2..35c87c8e93b 100644 --- a/enzyme/tools/enzyme-tblgen/blasDeclUpdater.h +++ b/enzyme/tools/enzyme-tblgen/blasDeclUpdater.h @@ -3,8 +3,8 @@ #include "datastructures.h" -void emit_attributeBLASCaller(ArrayRef blasPatterns, - raw_ostream &os) { +inline void emit_attributeBLASCaller(ArrayRef blasPatterns, + raw_ostream &os) { os << "void attributeBLAS(BlasInfo blas, llvm::Function *F) { \n"; os << " if (!F->empty())\n"; os << " return;\n"; @@ -18,7 +18,7 @@ void emit_attributeBLASCaller(ArrayRef blasPatterns, os << "} \n"; } -void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) { +inline void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) { auto name = pattern.getName(); bool lv23 = pattern.isBLASLevel2or3(); os << "llvm::Constant* attribute_" << name @@ -199,7 +199,7 @@ void emit_attributeBLAS(const TGPattern &pattern, raw_ostream &os) { os << "}\n"; } -void emitBlasDeclUpdater(const RecordKeeper &RK, raw_ostream &os) { +inline void emitBlasDeclUpdater(const RecordKeeper &RK, raw_ostream &os) { emitSourceFileHeader("Rewriters", os); const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern"); diff --git a/enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h b/enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h index 57f3aa654a5..db78a62717d 100644 --- a/enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h +++ b/enzyme/tools/enzyme-tblgen/blasDiffUseUpdater.h @@ -7,7 +7,7 @@ #include "enzyme-tblgen.h" #include "llvm/Support/raw_ostream.h" -void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) { +inline void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) { auto typeMap = pattern.getArgTypeMap(); auto argUsers = pattern.getArgUsers(); bool lv23 = pattern.isBLASLevel2or3(); @@ -142,7 +142,7 @@ void emit_BLASDiffUse(TGPattern &pattern, llvm::raw_ostream &os) { os << "}\n"; } -void emitBlasDiffUse(const RecordKeeper &RK, llvm::raw_ostream &os) { +inline void emitBlasDiffUse(const RecordKeeper &RK, llvm::raw_ostream &os) { emitSourceFileHeader("Rewriters", os); const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern"); diff --git a/enzyme/tools/enzyme-tblgen/blasTAUpdater.h b/enzyme/tools/enzyme-tblgen/blasTAUpdater.h index 82eba1b993e..33f63d16338 100644 --- a/enzyme/tools/enzyme-tblgen/blasTAUpdater.h +++ b/enzyme/tools/enzyme-tblgen/blasTAUpdater.h @@ -3,7 +3,7 @@ #include "datastructures.h" -void emit_BLASTypes(raw_ostream &os) { +inline void emit_BLASTypes(raw_ostream &os) { os << "const bool byRef = blas.prefix == \"\" || blas.prefix == " "\"cublas_\";\n"; os << "const bool byRefFloat = byRef || blas.prefix == " @@ -68,7 +68,7 @@ void emit_BLASTypes(raw_ostream &os) { // cblas lv23 => layout // cublas => always handle -void emit_BLASTA(TGPattern &pattern, raw_ostream &os) { +inline void emit_BLASTA(TGPattern &pattern, raw_ostream &os) { auto name = pattern.getName(); bool lv23 = pattern.isBLASLevel2or3(); @@ -183,7 +183,7 @@ void emit_BLASTA(TGPattern &pattern, raw_ostream &os) { os << "}\n"; } -void emitBlasTAUpdater(const RecordKeeper &RK, raw_ostream &os) { +inline void emitBlasTAUpdater(const RecordKeeper &RK, raw_ostream &os) { emitSourceFileHeader("Rewriters", os); const auto &blasPatterns = RK.getAllDerivedDefinitions("CallBlasPattern");