Skip to content

Commit

Permalink
extra Blas header to include instead of inc files
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuseZ4 committed Oct 24, 2023
1 parent 2d7611a commit d57adb3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions enzyme/Enzyme/AdjointGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -3748,8 +3748,7 @@ class AdjointGenerator
}

// first one allows adding attributes to blas functions declared in the second
#include "BlasAttributor.inc"
#include "BlasDerivatives.inc"
#include "BlasHeader.h"

void visitOMPCall(llvm::CallInst &call) {
using namespace llvm;
Expand Down
7 changes: 7 additions & 0 deletions enzyme/Enzyme/BlasHeader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Adds readonly/writeonly/... attributes to a BLAS function
void attributeBLAS(BlasInfo blas, llvm::Function *F);
// Adds attributes to a few more non blas functions
void attributeTablegen(llvm::Function &F);

// Differentiates BLAS functions
bool handleBLAS(llvm::CallInst &call, llvm::Function *called,BlasInfo blas,const std::vector<bool> &overwritten_args);
2 changes: 1 addition & 1 deletion enzyme/Enzyme/Enzyme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#include "llvm/Transforms/Utils/Mem2Reg.h"
#endif

#include "BlasAttributor.inc"
#include "BlasHeader.h"

#include "CApi.h"
using namespace llvm;
Expand Down
2 changes: 1 addition & 1 deletion enzyme/Enzyme/PreserveNVVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ bool preserveLinkage(bool Begin, Function &F) {
return false;
}

void attributeBLAS(BlasInfo blas, llvm::Function *F);
#include "BlasHeader.h"

bool preserveNVVM(bool Begin, Function &F) {
bool changed = false;
Expand Down

0 comments on commit d57adb3

Please sign in to comment.