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

tqchen 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 67bd739bed [MISC] Fix compile warnings (#16571)
67bd739bed is described below

commit 67bd739bed70707f92f1da3c25b380bcb436f366
Author: Siyuan Feng <[email protected]>
AuthorDate: Thu Feb 15 21:17:50 2024 +0800

    [MISC] Fix compile warnings (#16571)
    
    This PR fixes the following compile warnings:
    ```
    [build] warning: unknown command tag name [-Wdocumentation-unknown-command]
    [build]    90 |    *     @R.function
    [build]       |          ^~
    
    [build] warning: 'tvm::codegen::CodeGenWebGPU::AddFunction' hides 
overloaded virtual function [-Woverloaded-virtual]
    [build]    52 |   runtime::FunctionInfo AddFunction(const PrimFunc& f, bool 
skip_readonly_decl);  // NOLINT(*)
    [build]       |
    ```
---
 include/tvm/node/script_printer.h  | 2 ++
 src/target/source/codegen_webgpu.h | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/tvm/node/script_printer.h 
b/include/tvm/node/script_printer.h
index 2b812eef32..8e0cafb494 100644
--- a/include/tvm/node/script_printer.h
+++ b/include/tvm/node/script_printer.h
@@ -86,6 +86,7 @@ class PrinterConfigNode : public Object {
    *
    * Example:
    *
+   * \code{.py}
    *     # func.show(show_all_struct_info=True)
    *     @R.function
    *     def func(
@@ -103,6 +104,7 @@ class PrinterConfigNode : public Object {
    *     ) -> R.Tensor((10, 20), dtype="float32"):
    *         C = R.add(A, B2)
    *         return C
+   * \endcode
    */
   bool show_all_struct_info = true;
 
diff --git a/src/target/source/codegen_webgpu.h 
b/src/target/source/codegen_webgpu.h
index cf642b9e07..a100396b25 100644
--- a/src/target/source/codegen_webgpu.h
+++ b/src/target/source/codegen_webgpu.h
@@ -21,7 +21,7 @@
  * \file codegen_webgpu.h
  * \brief Generate WebGPU shaders in WGSL.
  *
- * This module generates WGSL shading langauge.
+ * This module generates WGSL shading language.
  * See https://www.w3.org/TR/WGSL/ for the language reference.
  */
 #ifndef TVM_TARGET_SOURCE_CODEGEN_WEBGPU_H_
@@ -40,7 +40,7 @@ namespace codegen {
  * \brief WebGPU code generator.
  *
  * Note WGSL have a different syntax from normal C.
- * We only leevrage the C for expression generation and
+ * We only leverage the C for expression generation and
  * write most of the language generations.
  */
 class CodeGenWebGPU final : public CodeGenC {
@@ -48,6 +48,7 @@ class CodeGenWebGPU final : public CodeGenC {
   explicit CodeGenWebGPU(Target target);
   // overrides
   std::string Finish() final;
+  using CodeGenC::AddFunction;
   runtime::FunctionInfo AddFunction(const PrimFunc& f, bool 
skip_readonly_decl);  // NOLINT(*)
   void InitFuncState(const PrimFunc& f) final;
   void PrintStorageSync(const CallNode* op) final;     // NOLINT(*)

Reply via email to