ZihengJiang commented on a change in pull request #7686:
URL: https://github.com/apache/tvm/pull/7686#discussion_r683023953
##########
File path: src/target/source/codegen_opencl.cc
##########
@@ -27,18 +27,63 @@
#include <vector>
#include "../../runtime/opencl/opencl_module.h"
+#include "../../runtime/texture.h"
#include "../../runtime/thread_storage_scope.h"
#include "../build_common.h"
namespace tvm {
namespace codegen {
-CodeGenOpenCL::CodeGenOpenCL() { restrict_keyword_ = "restrict"; }
+class InferTextureAccess : public StmtExprVisitor {
+ public:
+ static constexpr const uint8_t read_access = 1;
Review comment:
The naming convention is kReadAccess for constant.
##########
File path: src/tir/transforms/lower_tvm_builtin.cc
##########
@@ -98,6 +98,15 @@ class BuiltinLower : public StmtExprMutator {
}
}
+ Stmt VisitStmt_(const LetStmtNode* op) final {
Review comment:
Why does mutation happens in `LetStmtNode` instead of `CallNode`
directly?
##########
File path: src/target/source/codegen_c.h
##########
@@ -194,6 +194,8 @@ class CodeGenC : public ExprFunctor<void(const PrimExpr&,
std::ostream&)>,
virtual std::string CastFromTo(std::string value, DataType from, DataType
target);
// Get load of single element with expression
virtual void PrintVecElemLoadExpr(DataType t, int i, const std::string&
value, std::ostream& os);
+ // Print restrict keyword for a given Var if applicable
+ virtual void PrintRestrict(const Var& v, std::ostream& os);
Review comment:
What does `restrict` mean here?
--
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]