Skip to content
Snippets Groups Projects
Commit 8d73a5c1 authored by Tianqi Chen's avatar Tianqi Chen Committed by GitHub
Browse files

[CODEGEN] Fix Metal codegen when storage scope is needed (#469)

parent a85ec885
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,10 @@ std::string CodeGenC::GetBufferRef(
os << "*)(";
if (!HandleTypeMatch(buffer, t.element_of())) {
os << '(';
if (scope.length() != 0) {
PrintStorageScope(scope, os);
}
os << ' ';
PrintType(t.element_of(), os);
os << "*)";
}
......
......@@ -192,6 +192,8 @@ void CodeGenMetal::PrintStorageScope(
os << "device";
} else if (scope == "shared") {
os << "threadgroup";
} else {
os << "thread";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment