Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/target/spirv/codegen_spirv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ spirv::Value CodeGenSPIRV::VisitExpr_(const CallNode* op) {
} else if (op->op.same_as(builtin::popcount())) {
return builder_->MakeValue(spv::OpBitCount, builder_->GetSType(op->dtype),
MakeValue(op->args[0]));
} else if (op->op.same_as(builtin::call_extern()) ||
op->op.same_as(builtin::call_pure_extern())) {
ICHECK_GE(op->args.size(), 1U);
LOG(FATAL) << "SPIR-V shader cannot make extern calls. Graph contains extern \""
<< Downcast<StringImm>(op->args[0]) << "\"";
return spirv::Value();
} else {
LOG(FATAL) << "Unresolved call " << op->op;
return spirv::Value();
Expand Down