csullivan commented on code in PR #14397:
URL: https://github.com/apache/tvm/pull/14397#discussion_r1149635575
##########
src/target/source/codegen_opencl.cc:
##########
@@ -472,20 +445,15 @@ void CodeGenOpenCL::VisitExpr_(const CallNode* op,
std::ostream& os) {
this->PrintExpr(op->args[2], ss);
ss << ")))";
- // Only use local SSA if texture is not already being stored
- if (need_texture_ssa_) {
- std::string rhs = SSAGetID(ss.str(), op->dtype.with_lanes(4));
- if (op->args.back().as<RampNode>()) {
- os << rhs;
- } else {
- os << "((";
- this->PrintType(op->dtype.with_lanes(1), os);
- os << "*)&" << rhs << ")[";
- this->PrintExpr(op->args.back(), os);
- os << "]";
- }
Review Comment:
IIRC, without checking if the data is already stored, this ended up repeated
stores, resulting in less optimal opencl code. It might be optimized by the
runtime compiler but I recall a non-trivial perf difference.
--
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]