Commit 8fea0879 by eqy Committed by Tianqi Chen

inline AMD GPU functions (#625)

* Support vector operations for AMD (llvm IR)

* fix whitespace

* update comments, docstring

* inline AMD GPU functions
parent 90067e64
...@@ -176,6 +176,9 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) { ...@@ -176,6 +176,9 @@ runtime::Module BuildAMDGPU(Array<LoweredFunc> funcs, std::string target) {
} }
mlib->setTargetTriple(tm->getTargetTriple().str()); mlib->setTargetTriple(tm->getTargetTriple().str());
mlib->setDataLayout(tm->createDataLayout()); mlib->setDataLayout(tm->createDataLayout());
for (llvm::Function &f : mlib->functions()) {
f.addFnAttr(llvm::Attribute::AlwaysInline);
}
cg->AddLinkModule(std::move(mlib)); cg->AddLinkModule(std::move(mlib));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment