Skip to content

Commit

Permalink
[MISC] Fix compile warnings (apache#16571)
Browse files Browse the repository at this point in the history
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]       |
```
  • Loading branch information
Hzfengsy authored Feb 15, 2024
1 parent 1a01102 commit 67bd739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions include/tvm/node/script_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class PrinterConfigNode : public Object {
*
* Example:
*
* \code{.py}
* # func.show(show_all_struct_info=True)
* @R.function
* def func(
Expand All @@ -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;

Expand Down
5 changes: 3 additions & 2 deletions src/target/source/codegen_webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand All @@ -40,14 +40,15 @@ 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 {
public:
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(*)
Expand Down

0 comments on commit 67bd739

Please sign in to comment.