From eb558f9cab149a4ba96614c7aeaa20de1c76b250 Mon Sep 17 00:00:00 2001 From: Siyuan Feng Date: Tue, 17 Jan 2023 14:53:02 +0800 Subject: [PATCH] [FIX] Minor Compilation Warning Fixes This PR fixes some warnings from the latest clang compiler. --- include/tvm/tir/function.h | 8 ++++---- src/tir/analysis/control_flow_graph.h | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/tvm/tir/function.h b/include/tvm/tir/function.h index cf92f97360b1..9f7c0fa16b06 100644 --- a/include/tvm/tir/function.h +++ b/include/tvm/tir/function.h @@ -224,14 +224,14 @@ class TensorIntrin : public ObjectRef { TVM_DEFINE_OBJECT_REF_METHODS(TensorIntrin, ObjectRef, TensorIntrinNode) }; -/* +/*! * \brief Specialize parameters of PrimFunc. * \param func The PrimFunc to be specialized. * \param param_map The mapping from function params to the instance. * \return The new function with parameter specialized. * \note We can define a Meta TIR function with symbolic shape: * - * \code + * \code{.py} * @T.prim_func * def mem_copy(a: T.handle, b: T.handle, m: T.int32, n: T.int32) -> None: * A = T.match_buffer(a, (m, n), "float32") @@ -244,14 +244,14 @@ class TensorIntrin : public ObjectRef { * * Then we can make it specialized with given shapes or buffers. * - * \code + * \code{.py} * a, _, m, n = mem_copy.params * func = mem_copy.specialize({a: tir.decl_buffer((16, 16))}) * # or * func = mem_copy.specialize({n: 16, m: 16}) * \endcode * - * \code {.language-id} + * \code{.py} * @T.prim_func * def mem_copy_16_16(a: T.handle, b: T.handle) -> None: * A = T.match_buffer(a, (16, 16), "float32") diff --git a/src/tir/analysis/control_flow_graph.h b/src/tir/analysis/control_flow_graph.h index 590392cf658a..00a6b68ff945 100644 --- a/src/tir/analysis/control_flow_graph.h +++ b/src/tir/analysis/control_flow_graph.h @@ -292,7 +292,8 @@ class BufferState { std::vector constraints_; }; -/*! \brief Represents the flow of control through a `tir::Stmt` +/*! + * \brief Represents the flow of control through a `tir::Stmt` * * This class contains an internal representation of the possible * control flow that may occur during execution of a `tir::Stmt`. It @@ -312,7 +313,7 @@ class BufferState { * * For example, consider the following PrimFunc * - * ```python + * \code{.py} * @T.prim_func * def func(T.Buffer[16, "float32"]): * for i in T.serial(16): @@ -320,7 +321,7 @@ class BufferState { * B[i] = i * else: * B[i] = i-8 - * ``` + * \endcode * * The control flow graph would have eight control blocks. *