This is an automated email from the ASF dual-hosted git repository.

ruihangl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 6afa62cbe1 Fix typos in comments and strings (#17736)
6afa62cbe1 is described below

commit 6afa62cbe10df65f4895210b5e6d7d7c22c4a4d6
Author: co63oc <[email protected]>
AuthorDate: Tue Mar 11 22:39:31 2025 +0800

    Fix typos in comments and strings (#17736)
---
 apps/ios_rpc/tvmrpc/RPCServer.mm        | 30 +++++++++++++++---------------
 apps/ios_rpc/tvmrpc/TVMRuntime.mm       |  2 +-
 docs/contribute/document.rst            |  2 +-
 include/tvm/relax/expr_functor.h        |  2 +-
 include/tvm/relax/op_attr_types.h       |  2 +-
 include/tvm/relax/type.h                |  2 +-
 include/tvm/tir/analysis.h              |  2 +-
 include/tvm/tir/block_dependence_info.h |  4 ++--
 include/tvm/tir/builtin.h               |  2 +-
 include/tvm/tir/op.h                    |  2 +-
 web/emcc/tvmjs_support.cc               |  2 +-
 web/emcc/wasm_runtime.cc                |  2 +-
 12 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/apps/ios_rpc/tvmrpc/RPCServer.mm b/apps/ios_rpc/tvmrpc/RPCServer.mm
index b381d1afd1..5dcf8c1eb9 100644
--- a/apps/ios_rpc/tvmrpc/RPCServer.mm
+++ b/apps/ios_rpc/tvmrpc/RPCServer.mm
@@ -119,7 +119,7 @@ static std::string getWiFiAddress() {
  */
 - (bool)onReadHandler;   // return true - continue feeding, false - stop, try 
to drain output buffer
 - (bool)onWriteHandler;  // return true - continue draining, false - no data 
to write
-- (void)onEndEncountered;  // called on disconnect or session desided that 
it's shutdown time
+- (void)onEndEncountered;  // called on disconnect or session decided that 
it's shutdown time
 - (void)open;              // Initiate listening objects like i/o streams and 
other resources
 - (void)close;             // Deinitialize resources opend in "open" method
 @end
@@ -127,7 +127,7 @@ static std::string getWiFiAddress() {
 @implementation RPCServerBase {
   // Worker thread
   NSThread* worker_thread_;
-  // Triger to continue RunLoop processing inside worker_thread_
+  // Trigger to continue RunLoop processing inside worker_thread_
   BOOL shouldKeepRunning;
   // Input socket stream
  @protected
@@ -143,7 +143,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Start internal worker thread with RunLoop and submit correspoding open 
handlers into it
+ * Start internal worker thread with RunLoop and submit corresponding open 
handlers into it
  * Not blocking
  */
 - (void)start {
@@ -169,7 +169,7 @@ static std::string getWiFiAddress() {
   if (worker_thread_ == nil) return;
 
   [self performSelector:@selector(stop_) onThread:worker_thread_ 
withObject:nil waitUntilDone:NO];
-  worker_thread_ = nil;  // TODO: is it valide? may be better to do that 
inside NSThread?
+  worker_thread_ = nil;  // TODO: is it valid? may be better to do that inside 
NSThread?
 }
 
 - (void)stop_ {
@@ -178,7 +178,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Base implementation to selup i/o streams
+ * Base implementation to setup i/o streams
  * Will connect to host and port specified in corresponding properties
  */
 - (void)open {
@@ -197,7 +197,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Base implementation to selup i/o streams
+ * Base implementation to setup i/o streams
  * Will assign i/o streams to provided socket connection.
  */
 - (void)openWithSocket:(CFSocketNativeHandle)sock {
@@ -215,7 +215,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Close i/o streams assosiated with connection
+ * Close i/o streams associated with connection
  */
 - (void)close {
   [inputStream_ close];
@@ -239,7 +239,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Try to read data from stream and call processing hadnler
+ * Try to read data from stream and call processing handler
  */
 - (void)tryToRead {
   const int kBufferSize = 4 << 10;  // 4kB buffer
@@ -255,7 +255,7 @@ static std::string getWiFiAddress() {
 }
 
 /*!
- * Try to write remaining data to stream and call processing hadnler
+ * Try to write remaining data to stream and call processing handler
  */
 - (void)tryToWrite {
   if (!sendBuffer_.empty()) {
@@ -307,7 +307,7 @@ static std::string getWiFiAddress() {
 #pragma mark - Helpers
 
 /*!
- * Set buffer to send into stream. Try to send immediatly or submit to lazy 
sending
+ * Set buffer to send into stream. Try to send immediately or submit to lazy 
sending
  * Non blocking operation
  */
 - (void)toSend:(NSData*)data {
@@ -412,7 +412,7 @@ typedef enum {
  * Implement matching of internat state on state available for outside users
  */
 - (void)setState:(RPCServerProxyState)new_state {
-  // Send Connected notification because Proxy doesn't responce until client 
connected.
+  // Send Connected notification because Proxy doesn't response until client 
connected.
   if (new_state == RPCServerProxyState_HandshakeToRecv)
     [self notifyState:RPCServerStatus_Connected];
   if (new_state == RPCServerProxyState_Idle) [self 
notifyState:RPCServerStatus_Disconnected];
@@ -465,7 +465,7 @@ typedef enum {
       if (data == nil) return FALSE;
 
       if (*(int32_t*)data.bytes != tvm::runtime::kRPCMagic) {
-        [self notifyError:@"Wrong responce, is not RPC client."];
+        [self notifyError:@"Wrong response, is not RPC client."];
         [self close];
         return FALSE;
         break;
@@ -720,7 +720,7 @@ typedef enum {
       if (data == nil) return FALSE;
 
       if (*(int*)data.bytes != tvm::runtime::kRPCTrackerMagic) {
-        [self notifyError:@"Wrong responce, is not RPC Tracker."];
+        [self notifyError:@"Wrong response, is not RPC Tracker."];
         [self close];
         return FALSE;
         break;
@@ -734,7 +734,7 @@ typedef enum {
       if (data == nil) return FALSE;
 
       if (std::string((char*)data.bytes, data.length) != resp_OK) {
-        [self notifyError:@"Failed to Update info on tracker. Responce is not 
OK."];
+        [self notifyError:@"Failed to Update info on tracker. Response is not 
OK."];
         [self close];
         return FALSE;
         break;
@@ -748,7 +748,7 @@ typedef enum {
       if (data == nil) return FALSE;
 
       if (std::string((char*)data.bytes, data.length) != resp_OK) {
-        [self notifyError:@"Failed to Put server into tracker. Responce is not 
OK."];
+        [self notifyError:@"Failed to Put server into tracker. Response is not 
OK."];
         [self close];
         return FALSE;
         break;
diff --git a/apps/ios_rpc/tvmrpc/TVMRuntime.mm 
b/apps/ios_rpc/tvmrpc/TVMRuntime.mm
index baf5c8867a..4e1d66ed64 100644
--- a/apps/ios_rpc/tvmrpc/TVMRuntime.mm
+++ b/apps/ios_rpc/tvmrpc/TVMRuntime.mm
@@ -67,7 +67,7 @@ 
TVM_REGISTER_GLOBAL("tvm.rpc.server.load_module").set_body([](TVMArgs args, TVMR
     base = [[bundle privateFrameworksPath] 
stringByAppendingPathComponent:@"tvm"];
 
     if (Registry::Get("runtime.module.loadfile_dylib_custom")) {
-      // Custom dso laoder is present. Will use it.
+      // Custom dso loader is present. Will use it.
       base = NSTemporaryDirectory();
       fmt = "dylib_custom";
     }
diff --git a/docs/contribute/document.rst b/docs/contribute/document.rst
index d789b57141..35fd52c673 100644
--- a/docs/contribute/document.rst
+++ b/docs/contribute/document.rst
@@ -195,7 +195,7 @@ shows an example of c++ docstring.
     /*!
      * \brief Description of my function
      * \param arg1 Description of arg1
-     * \param arg2 Descroption of arg2
+     * \param arg2 Description of arg2
      * \returns describe return value
      */
     int myfunction(int arg1, int arg2) {
diff --git a/include/tvm/relax/expr_functor.h b/include/tvm/relax/expr_functor.h
index 9c867129fd..cdc09c4431 100644
--- a/include/tvm/relax/expr_functor.h
+++ b/include/tvm/relax/expr_functor.h
@@ -44,7 +44,7 @@ namespace relax {
  *
  * \sa tvm/ir_functor.h
  *
- * \tparam FType function signiture
+ * \tparam FType function signature
  *  This type is only defined for FType with function signature R(const Expr&,
  * Args...)
  */
diff --git a/include/tvm/relax/op_attr_types.h 
b/include/tvm/relax/op_attr_types.h
index e5dd1aaba1..0c215f023e 100644
--- a/include/tvm/relax/op_attr_types.h
+++ b/include/tvm/relax/op_attr_types.h
@@ -101,7 +101,7 @@ using FNormalize = runtime::TypedPackedFunc<Expr(const 
BlockBuilder& bb, Call ca
  *    this delay between generating an ill-formed `relax::Call` and
  *    identifying the ill-formed call may complicate debugging.  If
  *    the validation logic is very fast to check, and doing so would
- *    not introduce a signficant overhead, consider validating as part
+ *    not introduce a significant overhead, consider validating as part
  *    of `FNormalize`, which is applied by the block builder for each
  *    `relax::Call`.
  *
diff --git a/include/tvm/relax/type.h b/include/tvm/relax/type.h
index ed832f6a02..7e4149fe55 100644
--- a/include/tvm/relax/type.h
+++ b/include/tvm/relax/type.h
@@ -74,7 +74,7 @@ class ShapeType : public Type {
 class TensorTypeNode : public TypeNode {
  public:
   /*!
-   * \brief The number of dimensions of the tensor, use -1 to denote tensor 
with unknwon number of
+   * \brief The number of dimensions of the tensor, use -1 to denote tensor 
with unknown number of
    * dimensions.
    */
   int ndim;
diff --git a/include/tvm/tir/analysis.h b/include/tvm/tir/analysis.h
index 96459f25ec..32b3231781 100644
--- a/include/tvm/tir/analysis.h
+++ b/include/tvm/tir/analysis.h
@@ -271,7 +271,7 @@ struct MemCpyDetails {
 TVM_DLL std::optional<MemCpyDetails> IdentifyMemCpy(const For& loop, 
arith::Analyzer* analyzer);
 
 /*!
- * \brief Calculate the expresion complexity based on number of symbols it 
contains.
+ * \brief Calculate the expression complexity based on number of symbols it 
contains.
  * \param expr The expr to be calculated.
  */
 TVM_DLL size_t CalculateExprComplexity(const PrimExpr& expr);
diff --git a/include/tvm/tir/block_dependence_info.h 
b/include/tvm/tir/block_dependence_info.h
index fba05ea7e5..0e0d22c8cf 100644
--- a/include/tvm/tir/block_dependence_info.h
+++ b/include/tvm/tir/block_dependence_info.h
@@ -53,7 +53,7 @@ namespace tir {
 class BlockDependenceInfoNode : public Object {
  public:
   /*!
-   * \brief Mapping from a block sref to its correpsonding BlockScope,
+   * \brief Mapping from a block sref to its corresponding BlockScope,
    * tracking the dependency inside the block scope,
    */
   std::unordered_map<StmtSRef, BlockScope, ObjectPtrHash, ObjectPtrEqual> 
sref2scope;
@@ -66,7 +66,7 @@ class BlockDependenceInfoNode : public Object {
   TVM_DECLARE_FINAL_OBJECT_INFO(BlockDependenceInfoNode, Object);
 
   /*!
-   * \brief Get the BlockScope correpsonding to the sref of scope root block
+   * \brief Get the BlockScope corresponding to the sref of scope root block
    * \param scope_root The block sref to be retrieved
    * \return The corresponding BlockScope
    */
diff --git a/include/tvm/tir/builtin.h b/include/tvm/tir/builtin.h
index 964eb83f2d..2579250de2 100644
--- a/include/tvm/tir/builtin.h
+++ b/include/tvm/tir/builtin.h
@@ -511,7 +511,7 @@ TVM_DLL const Op& tvm_storage_sync();
  *  __shfl_down_sync and __activemask.
  *
  *  Parameter warp_size is the size of a warp, which helps a backend
- *  to determine wheter the width paramter is legal.
+ *  to determine whether the width parameter is legal.
  *
  */
 TVM_DLL const Op& tvm_warp_shuffle();
diff --git a/include/tvm/tir/op.h b/include/tvm/tir/op.h
index e98eb46be9..cfbd445295 100644
--- a/include/tvm/tir/op.h
+++ b/include/tvm/tir/op.h
@@ -513,7 +513,7 @@ TVM_DLL PrimExpr pow(PrimExpr x, PrimExpr y, Span span = 
Span());
  * \param x The input data
  * \param span The location of this operation in the source.
  *
- * \return The aboslute value of input data x
+ * \return The absolute value of input data x
  */
 TVM_DLL PrimExpr abs(PrimExpr x, Span span = Span());
 /*!
diff --git a/web/emcc/tvmjs_support.cc b/web/emcc/tvmjs_support.cc
index 324dcf7fd0..248953fe2e 100644
--- a/web/emcc/tvmjs_support.cc
+++ b/web/emcc/tvmjs_support.cc
@@ -69,7 +69,7 @@ TVM_DLL int TVMWasmFuncCreateFromCFunc(void* resource_handle, 
TVMFunctionHandle*
  * \param type_codes The type codes of the arguments
  * \param num_args Number of arguments.
  * \param ret The return value handle.
- * \param resource_handle The handle additional resouce handle from fron-end.
+ * \param resource_handle The handle additional resource handle from front-end.
  * \return 0 if success, -1 if failure happens, set error via 
TVMAPISetLastError.
  */
 extern int TVMWasmPackedCFunc(TVMValue* args, int* type_codes, int num_args, 
TVMRetValueHandle ret,
diff --git a/web/emcc/wasm_runtime.cc b/web/emcc/wasm_runtime.cc
index 7def363734..67255f254b 100644
--- a/web/emcc/wasm_runtime.cc
+++ b/web/emcc/wasm_runtime.cc
@@ -130,7 +130,7 @@ 
TVM_REGISTER_GLOBAL("testing.wrap_callback").set_body([](TVMArgs args, TVMRetVal
 // internal function used for debug and testing purposes
 TVM_REGISTER_GLOBAL("testing.object_use_count").set_body([](TVMArgs args, 
TVMRetValue* ret) {
   runtime::ObjectRef obj = args[0];
-  // substract the current one because we always copy
+  // subtract the current one because we always copy
   // and get another value.
   *ret = (obj.use_count() - 1);
 });

Reply via email to