Skip to content

Commit

Permalink
Fixed docstring errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunderberg committed May 16, 2022
1 parent 3229175 commit ec66ff1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions python/tvm/tir/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,23 +276,23 @@ def from_func(mapping_function: Callable, ndim: Optional[int] = None):
mapping_function : Callable
The function to map from source indices to target indices.
The function should accept tir.Var parameters and return a
list. Each element of the returned list should be a
tir.PrimExpr.
The function should accept `tir.Var` parameters and return
a list. Each element of the returned list should be a
`tir.PrimExpr`.
ndim: Optional[int]
The dimensionality of the buffer to which this
transformation should be applied. If mapping_function
uses variadic argument *args, ndim must be specified. If
transformation should be applied. If mapping_function uses
variadic argument `*args`, `ndim` must be specified. If
mapping_function does not use variadic arguments, ndim is
optional.
Returns
-------
index_map: IndexMap
Returns an IndexMap representing the mapping_function.
Returns an IndexMap representing the `mapping_function`.
"""
index_map, axis_separators = IndexMap.from_func_with_separators(mapping_function, ndim)
Expand All @@ -314,13 +314,13 @@ def from_func_with_separators(mapping_function: Callable, ndim: Optional[int] =
The function to map from source indices to target indices.
The function should accept tir.Var parameters and return a
list. Each element of the returned list should be either a
tir.PrimExpr or the object IndexMap.AXIS_SEPARATOR.
`tir.PrimExpr` or the object `IndexMap.AXIS_SEPARATOR`.
ndim: Optional[int]
The dimensionality of the buffer to which this
transformation should be applied. If mapping_function
uses variadic argument *args, ndim must be specified. If
transformation should be applied. If mapping_function uses
variadic argument `*args`, ndim must be specified. If
mapping_function does not use variadic arguments, ndim is
optional.
Expand All @@ -329,8 +329,8 @@ def from_func_with_separators(mapping_function: Callable, ndim: Optional[int] =
ret: Tuple[IndexMap, List[int]]
Returns a tuple whose first element is an IndexMap
representing the mapping_function, and whose second index
is a list of indices at which IndexMap.AXIS_SEPARATOR
representing the `mapping_function`, and whose second index
is a list of indices at which `IndexMap.AXIS_SEPARATOR`
occurred.
"""
Expand Down

0 comments on commit ec66ff1

Please sign in to comment.