tqchen commented on code in PR #18523:
URL: https://github.com/apache/tvm/pull/18523#discussion_r2673043021


##########
src/runtime/opencl/opencl_module.cc:
##########
@@ -50,6 +50,89 @@ class OpenCLWrappedFunc {
     arg_size_ = arg_size;
     launch_param_config_.Init(arg_size.size(), launch_param_tags);
   }
+
+#ifdef PROFILE_SHADER_DUMP

Review Comment:
   this is understandable, however, would be useful to think about if we can 
move this logic to outside of the core code-base, e.g. if such tracing can be 
done in the driver API, or we can have a ffi function hook that user registers 
and runs



##########
src/tir/transforms/texture_flatten.cc:
##########
@@ -0,0 +1,228 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*!
+ * \file texture_flatten.cc
+ * \brief Flattens texture storage from multi-dimensional array
+ * to 2D (width, height) buffer access
+ */
+
+#include <tvm/ffi/reflection/registry.h>
+#include <tvm/te/operation.h>
+#include <tvm/tir/builtin.h>
+#include <tvm/tir/expr.h>
+#include <tvm/tir/stmt.h>
+#include <tvm/tir/transform.h>
+
+#include <unordered_map>
+
+#include "../../arith/ir_visitor_with_analyzer.h"
+#include "../../runtime/texture.h"
+#include "../../runtime/thread_storage_scope.h"
+
+namespace tvm {
+namespace tir {
+using arith::IRVisitorWithAnalyzer;
+using runtime::ApplyTexture2DFlattening;
+using runtime::DefaultTextureLayoutSeparator;
+using runtime::IsTextureStorage;
+
+class TextureLoweringBase : public StmtExprMutator {

Review Comment:
   Given this and the other transformations are related to texture and is not 
needed in None texture case,  might be useful to move it to 
src/tir/backend/adreno, is it possible to have a adreno specific pipeline for 
this like relax one? that way it gives clearity and also gives freedom of 
evolutions for future changes



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to