Skip to content

Commit

Permalink
WIP: added HIP compiler optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
tcew committed Apr 29, 2020
1 parent d7bba7c commit 96c2215
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CEED/BP/occa/src/BP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ int main(int argc, char **argv){
kernelInfo["includes"].asArray();
kernelInfo["header"].asArray();
kernelInfo["flags"].asObject();
kernelInfo["compiler_flags"].asObject();

meshOccaSetup3D(mesh, options, kernelInfo);

Expand All @@ -101,6 +102,10 @@ int main(int argc, char **argv){
printf(" OpenCL\n");
kernelInfo["compiler_flags"] = " -cl-std=CL2.0 -cl-fast-relaxed-math ";
}
if(occaMode=="HIP"){
printf(" HIP\n");
kernelInfo["compiler_flags"] = " -O3 -ffp-contract=fast -funsafe-math-optimizations -ffast-math ";
}


BP_t *BP = BPSetup(mesh, lambda, mu, kernelInfo, options);
Expand Down
7 changes: 7 additions & 0 deletions CEED/BP/occa/src/BPSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ void BPSolveSetup(BP_t *BP, dfloat lambda, dfloat mu, occa::properties &kernelIn
kernelInfo["compiler_flags"].asObject();
kernelInfo["compiler_flags"] = " -cl-std=CL2.0 -cl-fast-relaxed-math ";
}
#if 0
if(occaMode=="HIP"){
printf(" HIP\n");
kernelInfo["compiler_flags"].asObject();
kernelInfo["compiler_flags"] = "-O3 -ffp-contract=fast -funsafe-math-optimizations -ffast-math ";
}
#endif


printf("ENTERING KERNEL BUILDS\n");
Expand Down

0 comments on commit 96c2215

Please sign in to comment.