You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2026/10/15 14:14:21 UTC
(tvm) 16/33: [STYLE] Format relocated include paths and printer imports
This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch tirx/standalone-package-cleanup
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit e7fff21d102e6794f80286b3b22db95aa96fadc4
Author: Tianqi Chen <tq...@users.noreply.github.com>
AuthorDate: Thu Oct 15 02:10:48 2026 +0000
[STYLE] Format relocated include paths and printer imports
---
apps/android_rpc/app/src/main/jni/tvm_runtime.h | 12 ++++++------
include/tvm/runtime/vm/tensor_cache_support.h | 7 ++++---
src/runtime/extra/contrib/cublas/cublas.cc | 2 +-
src/runtime/extra/contrib/hipblas/hipblas.cc | 2 +-
tirx/include/tvm/codegen/codegen.h | 8 ++++----
tirx/src/script/printer/printer.cc | 4 ++--
web/emcc/wasm_runtime.cc | 12 ++++++------
7 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/apps/android_rpc/app/src/main/jni/tvm_runtime.h b/apps/android_rpc/app/src/main/jni/tvm_runtime.h
index fa5784e0d7..60638071c6 100644
--- a/apps/android_rpc/app/src/main/jni/tvm_runtime.h
+++ b/apps/android_rpc/app/src/main/jni/tvm_runtime.h
@@ -43,11 +43,6 @@
#include "../3rdparty/tvm-ffi/src/ffi/function.cc"
#include "../3rdparty/tvm-ffi/src/ffi/object.cc"
#include "../3rdparty/tvm-ffi/src/ffi/tensor.cc"
-#include "../tirx/src/runtime/cpu_device_api.cc"
-#include "../tirx/src/runtime/device_api.cc"
-#include "../tirx/src/runtime/logging.cc"
-#include "../tirx/src/runtime/memory_scope.cc"
-#include "../tirx/src/runtime/metadata.cc"
#include "../src/runtime/registry.cc"
#include "../src/runtime/rpc/rpc_channel.cc"
#include "../src/runtime/rpc/rpc_endpoint.cc"
@@ -57,11 +52,16 @@
#include "../src/runtime/rpc/rpc_server_env.cc"
#include "../src/runtime/rpc/rpc_session.cc"
#include "../src/runtime/rpc/rpc_socket_impl.cc"
+#include "../src/runtime/vm/params.cc"
+#include "../tirx/src/runtime/cpu_device_api.cc"
+#include "../tirx/src/runtime/device_api.cc"
+#include "../tirx/src/runtime/logging.cc"
+#include "../tirx/src/runtime/memory_scope.cc"
+#include "../tirx/src/runtime/metadata.cc"
#include "../tirx/src/runtime/tensor.cc"
#include "../tirx/src/runtime/thread_pool.cc"
#include "../tirx/src/runtime/threading_backend.cc"
#include "../tirx/src/runtime/timer.cc"
-#include "../src/runtime/vm/params.cc"
#include "../tirx/src/runtime/workspace_pool.cc"
#ifdef TVM_OPENCL_RUNTIME
diff --git a/include/tvm/runtime/vm/tensor_cache_support.h b/include/tvm/runtime/vm/tensor_cache_support.h
index d5b1546e96..0293810deb 100644
--- a/include/tvm/runtime/vm/tensor_cache_support.h
+++ b/include/tvm/runtime/vm/tensor_cache_support.h
@@ -46,8 +46,9 @@ struct TensorCacheMetadata {
* \param staging_buffer The buffer to be used to avoid extra OpenCL copies. Pass in a nullptr
* in other cases
*/
- TVM_RUNTIME_EXTRA_DLL ffi::Tensor Load(Device device, const std::string* raw_data,
- ffi::Optional<ffi::Tensor>* staging_buffer = nullptr) const;
+ TVM_RUNTIME_EXTRA_DLL ffi::Tensor Load(
+ Device device, const std::string* raw_data,
+ ffi::Optional<ffi::Tensor>* staging_buffer = nullptr) const;
/*! \brief Name of the parameter */
std::string name;
@@ -88,7 +89,7 @@ struct TensorCacheMetadata {
TVM_RUNTIME_EXTRA_DLL static TensorCacheMetadata Load(const std::string& path);
/*! \brief Load the metadata from a given JSON string */
TVM_RUNTIME_EXTRA_DLL static TensorCacheMetadata LoadFromStr(const std::string& json_str,
- const std::string& path);
+ const std::string& path);
};
} // namespace vm
diff --git a/src/runtime/extra/contrib/cublas/cublas.cc b/src/runtime/extra/contrib/cublas/cublas.cc
index 5c293fcd4b..a7cd28b1b1 100644
--- a/src/runtime/extra/contrib/cublas/cublas.cc
+++ b/src/runtime/extra/contrib/cublas/cublas.cc
@@ -27,8 +27,8 @@
#include <tvm/ffi/function.h>
#include <tvm/ffi/reflection/registry.h>
-#include "builtin_fp16.h"
#include "../cblas/gemm_common.h"
+#include "builtin_fp16.h"
#include "cublas_utils.h"
namespace tvm {
diff --git a/src/runtime/extra/contrib/hipblas/hipblas.cc b/src/runtime/extra/contrib/hipblas/hipblas.cc
index f1e8f890ca..c2120192c9 100644
--- a/src/runtime/extra/contrib/hipblas/hipblas.cc
+++ b/src/runtime/extra/contrib/hipblas/hipblas.cc
@@ -26,8 +26,8 @@
#include <tvm/ffi/function.h>
#include <tvm/ffi/reflection/registry.h>
-#include "builtin_fp16.h"
#include "../cblas/gemm_common.h"
+#include "builtin_fp16.h"
#include "hipblas_utils.h"
namespace tvm {
diff --git a/tirx/include/tvm/codegen/codegen.h b/tirx/include/tvm/codegen/codegen.h
index 6e2925a9cf..8fdb4a1b0d 100644
--- a/tirx/include/tvm/codegen/codegen.h
+++ b/tirx/include/tvm/codegen/codegen.h
@@ -55,7 +55,7 @@ TVM_TIRX_DLL ffi::Module Build(IRModule mod, Target target);
* \return cstr The C string representation of the file.
*/
TVM_TIRX_DLL std::string PackImportsToC(const ffi::Module& m, bool system_lib,
- const std::string& c_symbol_prefix = "");
+ const std::string& c_symbol_prefix = "");
/*!
* \brief Pack imported device libraries into an object file using LLVM.
@@ -70,9 +70,9 @@ TVM_TIRX_DLL std::string PackImportsToC(const ffi::Module& m, bool system_lib,
* \param c_symbol_prefix Optional blob symbol prefix, valid only for system libraries.
*/
TVM_TIRX_DLL void PackImportsToObjectFile(const ffi::Module& mod, bool system_lib,
- const std::string& llvm_target_string,
- const std::string& file_name,
- const std::string& c_symbol_prefix = "");
+ const std::string& llvm_target_string,
+ const std::string& file_name,
+ const std::string& c_symbol_prefix = "");
namespace attr {
constexpr const char* kParallelStridePattern = "parallel_stride_pattern";
diff --git a/tirx/src/script/printer/printer.cc b/tirx/src/script/printer/printer.cc
index a8ffd598e2..feeacc432c 100644
--- a/tirx/src/script/printer/printer.cc
+++ b/tirx/src/script/printer/printer.cc
@@ -372,8 +372,8 @@ ffi::String RenderScript(const ffi::ObjectRef& obj, const PrinterConfig& config)
->Attr("load_json")
->Call({LiteralDoc::Str(json, std::nullopt)}),
std::nullopt));
- header.push_back(
- ffi::String(loader == "tvm_tirx" ? "import tvm_tirx\n" : "import tvm_tirx as " + loader + "\n"));
+ header.push_back(ffi::String(loader == "tvm_tirx" ? "import tvm_tirx\n"
+ : "import tvm_tirx as " + loader + "\n"));
} else {
block.value()->stmts.push_back(
CommentDoc("Metadata omitted. Use show_meta=True in script() method to show it."));
diff --git a/web/emcc/wasm_runtime.cc b/web/emcc/wasm_runtime.cc
index 02948f145e..a9f07eb0c0 100644
--- a/web/emcc/wasm_runtime.cc
+++ b/web/emcc/wasm_runtime.cc
@@ -35,20 +35,20 @@
#include <cstring>
#include <limits>
-#include "tirx/src/runtime/cpu_device_api.cc"
-#include "tirx/src/runtime/device_api.cc"
#include "src/runtime/extra/contrib/sort/sort.cc"
-#include "tirx/src/runtime/logging.cc"
-#include "tirx/src/runtime/metadata.cc"
#include "src/runtime/rpc/rpc_channel.cc"
#include "src/runtime/rpc/rpc_endpoint.cc"
#include "src/runtime/rpc/rpc_event_impl.cc"
#include "src/runtime/rpc/rpc_local_session.cc"
#include "src/runtime/rpc/rpc_module.cc"
#include "src/runtime/rpc/rpc_session.cc"
+#include "src/runtime/vm/params.cc"
+#include "tirx/src/runtime/cpu_device_api.cc"
+#include "tirx/src/runtime/device_api.cc"
+#include "tirx/src/runtime/logging.cc"
+#include "tirx/src/runtime/metadata.cc"
#include "tirx/src/runtime/tensor.cc"
#include "tirx/src/runtime/timer.cc"
-#include "src/runtime/vm/params.cc"
#include "tirx/src/runtime/workspace_pool.cc"
// relax setup
#include "3rdparty/tvm-ffi/src/ffi/backtrace.cc"
@@ -69,7 +69,6 @@
#include "3rdparty/tvm-ffi/src/ffi/tensor.cc"
#include "3rdparty/tvm-ffi/src/ffi/testing/testing.cc"
// Enum registration requires the FFI type-attribute registry above.
-#include "tirx/src/runtime/memory_scope.cc"
#include "src/runtime/vm/attn_backend.cc"
#include "src/runtime/vm/builtin.cc"
#include "src/runtime/vm/bytecode.cc"
@@ -80,6 +79,7 @@
#include "src/runtime/vm/rnn_state.cc"
#include "src/runtime/vm/tensor_cache_support.cc"
#include "src/runtime/vm/vm.cc"
+#include "tirx/src/runtime/memory_scope.cc"
// --- Implementations of backend and wasm runtime API. ---