mei-ye commented on code in PR #14817:
URL: https://github.com/apache/tvm/pull/14817#discussion_r1199561708


##########
src/target/spirv/codegen_spirv.cc:
##########
@@ -394,6 +395,120 @@ spirv::Value CodeGenSPIRV::VisitExpr_(const CallNode* op) 
{
     LOG(FATAL) << "SPIR-V shader cannot make extern calls.  Graph contains 
extern \""
                << Downcast<StringImm>(op->args[0]) << "\"";
     return spirv::Value();
+  } else if (op->op.same_as(builtin::tvm_fill_fragment())) {
+    ICHECK_EQ(op->args.size(), 6U);
+    const VarNode* buffer_node = op->args[0].as<VarNode>();
+    ICHECK(buffer_node && fragment_info_.count(buffer_node));
+    DataType ele_dtype = GetElementDataType(buffer_node);
+    ICHECK(ele_dtype.is_float()) << "Only floating point fragment accumulator 
is supported";
+    spirv::SType ele_stype = builder_->GetSType(ele_dtype);
+    spirv::SType& fragment_type = fragment_info_[buffer_node].stype;
+    double init = 
static_cast<uint64_t>(Downcast<FloatImm>(op->args[5])->value);

Review Comment:
   I can't recall a good reason.  Removing this cast works fine.  Should I 
reset and re-patch?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to