Commit da27cfec by Tianqi Chen Committed by GitHub

[CODEGEN] Fix CPU compute attribute (#582)

parent 18e4a1bd
...@@ -317,7 +317,7 @@ void CodeGenCPU::CreateComputeScope(const AttrStmt* op) { ...@@ -317,7 +317,7 @@ void CodeGenCPU::CreateComputeScope(const AttrStmt* op) {
if (var.type().is_handle() && !alias_var_set_.count(var.get())) { if (var.type().is_handle() && !alias_var_set_.count(var.get())) {
// set non alias. // set non alias.
#if TVM_LLVM_VERSION >= 50 #if TVM_LLVM_VERSION >= 50
fcompute->addParamAttr(idx + 1, llvm::Attribute::NoAlias); fcompute->addParamAttr(idx, llvm::Attribute::NoAlias);
// always not inline compute function to make the code structure clean // always not inline compute function to make the code structure clean
#else #else
fcompute->setDoesNotAlias(idx + 1); fcompute->setDoesNotAlias(idx + 1);
......
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