Fix typos 2 (#842)
Co-authored-by: Haicheng Wu <57973641+hwu36@users.noreply.github.com>
This commit is contained in:
co-authored by
Haicheng Wu
parent
c4f6b8c6bc
commit
7e370c9637
@@ -51,9 +51,9 @@ void bind_opcode(py::module &m) {
|
||||
.value("Simt", cutlass::OpcodeClass::kSimt,
|
||||
R"pbdoc(Tag classifying math operators as thread-level operations)pbdoc")
|
||||
.value("TensorOp", cutlass::OpcodeClass::kTensorOp,
|
||||
R"pbdoc(Tag classifing operators as Tensor Core operations)pbdoc")
|
||||
R"pbdoc(Tag classifying operators as Tensor Core operations)pbdoc")
|
||||
.value("WmmaTensorOp", cutlass::OpcodeClass::kWmmaTensorOp,
|
||||
R"pbdoc(Tag classifing operators as WMMA Tensor Core operations)pbdoc")
|
||||
R"pbdoc(Tag classifying operators as WMMA Tensor Core operations)pbdoc")
|
||||
.value("SparseTensorOp", cutlass::OpcodeClass::kSparseTensorOp,
|
||||
R"pbdoc(Tag classifing operators as sparseTensor Core operations)pbdoc");
|
||||
R"pbdoc(Tag classifying operators as sparseTensor Core operations)pbdoc");
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace py = pybind11;
|
||||
void bind_conv_problem_size(py::module &m) {
|
||||
//
|
||||
// Conv2d Problem Size:
|
||||
// include/cutlass/conv/conv2d_problem_sizd.h
|
||||
// include/cutlass/conv/conv2d_problem_size.h
|
||||
//
|
||||
py::class_<cutlass::conv::Conv2dProblemSize>(m, "Conv2dProblemSize")
|
||||
// constructors
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ public:
|
||||
using BinaryOp = BinaryOp_<ElementCompute, kElementsPerAccess>;
|
||||
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeA::kElements, "kElementsPerAccess mismatches with Visitor A");
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeB::kElements, "kElementsPerAccess misnatches with Visitor B");
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeB::kElements, "kElementsPerAccess mismatches with Visitor B");
|
||||
|
||||
/// SMEM buffer class required in the epilogue visitor
|
||||
struct SharedStorage {
|
||||
|
||||
+2
-2
@@ -55,7 +55,7 @@ template <
|
||||
typename ElementReduction_, ///< Data type of the output reduction in device memory
|
||||
typename ElementReductionAccumulator_ , ///< Data type to accumulate reduction in smem and register
|
||||
typename OutputTileIterator_, ///< Tile Iterator type
|
||||
typename Visitor_ ///< preceeding visitor op
|
||||
typename Visitor_ ///< preceding visitor op
|
||||
>
|
||||
class VisitorOpColumnReduction {
|
||||
public:
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
/// Fragment type of accumulator
|
||||
using AccumulatorAccessType = Array<ElementAccumulator, kElementsPerAccess>;
|
||||
|
||||
/// Fragment type of redcution
|
||||
/// Fragment type of reduction
|
||||
using ReductionAccumulatorAccessType = Array<ElementReductionAccumulator, kElementsPerAccess>;
|
||||
|
||||
/// Thread map used by output tile iterators
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public:
|
||||
using CombinationOp = cutlass::plus<VisitAccessType>;
|
||||
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeA::kElements, "kElementsPerAccess mismatches with Visitor A");
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeB::kElements, "kElementsPerAccess misnatches with Visitor B");
|
||||
static_assert(kElementsPerAccess==VisitAccessTypeB::kElements, "kElementsPerAccess mismatches with Visitor B");
|
||||
|
||||
/// SMEM buffer class required in the epilogue visitor
|
||||
struct SharedStorage {
|
||||
|
||||
+2
-2
@@ -56,7 +56,7 @@ template <
|
||||
typename ElementReduction_, ///< Data type of the output reduction in device memory
|
||||
typename ElementReductionAccumulator_ , ///< Data type to accumulate reduction in smem and register
|
||||
typename OutputTileIterator_, ///< Tile Iterator type
|
||||
typename Visitor_ ///< preceeding visitor op
|
||||
typename Visitor_ ///< preceding visitor op
|
||||
>
|
||||
class VisitorOpRowReduction {
|
||||
public:
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
/// Fragment type of accumulator
|
||||
using AccumulatorAccessType = Array<ElementAccumulator, kElementsPerAccess>;
|
||||
|
||||
/// Fragment type of redcution
|
||||
/// Fragment type of reduction
|
||||
using ReductionAccumulatorAccessType = Array<ElementReductionAccumulator, kElementsPerAccess>;
|
||||
|
||||
/// Thread map used by output tile iterators
|
||||
|
||||
@@ -52,7 +52,7 @@ void bind_gemm(py::module &m) {
|
||||
.value("Array", cutlass::gemm::GemmUniversalMode::kArray)
|
||||
.value("Invalid", cutlass::gemm::GemmUniversalMode::kInvalid);
|
||||
|
||||
/// GemmCoord is a structure that specifies a location within the coordiate space of a GEMM problem
|
||||
/// GemmCoord is a structure that specifies a location within the coordinate space of a GEMM problem
|
||||
py::class_<cutlass::gemm::GemmCoord>(m, "GemmCoord")
|
||||
.def(py::init<int, int, int>())
|
||||
.def("m", py::overload_cast<>(&cutlass::gemm::GemmCoord::m))
|
||||
|
||||
@@ -88,7 +88,7 @@ void bind_identity_swizzle(py::module & m, std::string name) {
|
||||
R"pbdoc(Computes CUDA grid dimensions given a size in units of logical tiles)pbdoc")
|
||||
.def("tag", [](const T & swizzle){
|
||||
return demangle(typeid(T).name());
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emittion)pbdoc");
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emission)pbdoc");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -109,7 +109,7 @@ void bind_swizzle(py::module & m, std::string name, std::string doc) {
|
||||
R"pbdoc(Computes CUDA grid dimensions given a size in units of logical tiles)pbdoc")
|
||||
.def("tag", [](const T & swizzle){
|
||||
return demangle(typeid(T).name());
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emittion)pbdoc");
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emission)pbdoc");
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -132,7 +132,7 @@ void bind_dgrad_swizzle(py::module & m, std::string name) {
|
||||
R"pbdoc(Computes CUDA grid dimensions given a size in units of logical tiles)pbdoc")
|
||||
.def("tag", [](const T & swizzle){
|
||||
return demangle(typeid(T).name());
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emittion)pbdoc");
|
||||
}, R"pbdoc(Returns the c++ name of the swizzling for code emission)pbdoc");
|
||||
}
|
||||
|
||||
void bind_threadblock_swizzle(py::module &m) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE<cutlass::TensorRef<QUENTIAL
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
|
||||
@@ -97,7 +97,7 @@ def cluster_shape_to_tma(dim):
|
||||
|
||||
def make_cpasync_gmem_tiled_copy(thread_count, element, alignment, gmma_layout, dim_mn, dim_k):
|
||||
"""
|
||||
Returns a `make_tiled_copy` call for a given configuraiton
|
||||
Returns a `make_tiled_copy` call for a given configuration
|
||||
|
||||
:param thread_count: number of threads in the threadblock
|
||||
:type thread_count: int
|
||||
@@ -296,7 +296,7 @@ def common_values(op, stage_count, transform_A, transform_B):
|
||||
|
||||
def build_gmma_tma(op):
|
||||
"""
|
||||
Builds a collective operation declaration targetting TMA GMMA kernels
|
||||
Builds a collective operation declaration targeting TMA GMMA kernels
|
||||
|
||||
:param op: GEMM operation for which to build a collective operation
|
||||
:type op: pycutlass.GemmOperation
|
||||
@@ -335,7 +335,7 @@ def build_gmma_tma(op):
|
||||
|
||||
def build_gmma_cpasync(op):
|
||||
"""
|
||||
Builds a collective operation declaration targetting cp.async GMMA kernels
|
||||
Builds a collective operation declaration targeting cp.async GMMA kernels
|
||||
|
||||
:param op: GEMM operation for which to build a collective operation
|
||||
:type op: pycutlass.GemmOperation
|
||||
@@ -377,7 +377,7 @@ def build_gmma_cpasync(op):
|
||||
|
||||
def build(operation):
|
||||
"""
|
||||
Builds a collective operation declaration targetting cp.async or TMA for GMMA kernels
|
||||
Builds a collective operation declaration targeting cp.async or TMA for GMMA kernels
|
||||
|
||||
:param operation: GEMM operation for which to build a collective operation
|
||||
:type operation: pycutlass.GemmOperation
|
||||
|
||||
@@ -150,7 +150,7 @@ def get_gemm_arguments(epilogue_functor):
|
||||
("ldc", ctypes.c_longlong),
|
||||
("ldd", ctypes.c_longlong),
|
||||
("ptr_gather_A_indices", ctypes.c_void_p),
|
||||
("ptr_gether_B_indices", ctypes.c_void_p),
|
||||
("ptr_gather_B_indices", ctypes.c_void_p),
|
||||
("ptr_scatter_D_indices", ctypes.c_void_p)
|
||||
]
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ class GemmArguments2x(ArgumentBase):
|
||||
# get launch configuration
|
||||
launch_config = self.operation.rt_module.plan(self)
|
||||
|
||||
# get the host and evice workspace
|
||||
# get the host and device workspace
|
||||
device_workspace_size = \
|
||||
self.operation.rt_module.get_device_workspace_size(self)
|
||||
|
||||
@@ -293,7 +293,7 @@ class GemmArguments2x(ArgumentBase):
|
||||
device_workspace = 0
|
||||
if (workspace_ptr is not None and
|
||||
self.gemm_mode == cutlass.gemm.Mode.GemmSplitKParallel):
|
||||
# in GEMM splik-K parallel, the D pointer is redirected
|
||||
# in GEMM split-K parallel, the D pointer is redirected
|
||||
# to the workspace
|
||||
self.ptr_D = cuda.CUdeviceptr(workspace_ptr)
|
||||
elif (workspace_ptr is not None and
|
||||
@@ -350,7 +350,7 @@ class GemmArguments3x(GemmArguments2x):
|
||||
A: 'Tensor', B: 'Tensor', C: 'Tensor', D: 'Tensor',
|
||||
gemm_mode: 'cutlass.gemm.Mode'=cutlass.gemm.Mode.Gemm, **kwargs):
|
||||
if gemm_mode not in [cutlass.gemm.Mode.Gemm, cutlass.gemm.Mode.Batched]:
|
||||
raise Exception("Unsupporged GEMM mode {}.".format(gemm_mode))
|
||||
raise Exception("Unsupported GEMM mode {}.".format(gemm_mode))
|
||||
|
||||
super().__init__(operation, problem_size, A, B, C, D, gemm_mode, **kwargs)
|
||||
|
||||
@@ -387,7 +387,7 @@ class GemmArguments3x(GemmArguments2x):
|
||||
)
|
||||
|
||||
def initialize(self):
|
||||
# get the host and evice workspace
|
||||
# get the host and device workspace
|
||||
device_workspace_size = \
|
||||
self.operation.rt_module.get_device_workspace_size(self)
|
||||
|
||||
@@ -402,7 +402,7 @@ class GemmArguments3x(GemmArguments2x):
|
||||
device_workspace = 0
|
||||
if (workspace_ptr is not None and
|
||||
self.gemm_mode == cutlass.gemm.Mode.GemmSplitKParallel):
|
||||
# in GEMM splik-K parallel, the D pointer is redirected
|
||||
# in GEMM split-K parallel, the D pointer is redirected
|
||||
# to the workspace
|
||||
self.ptr_D = cuda.CUdeviceptr(workspace_ptr)
|
||||
elif (workspace_ptr is not None and
|
||||
@@ -610,7 +610,7 @@ class GemmGroupedArguments:
|
||||
# get launch configuration
|
||||
launch_config = self.operation.rt_module.plan(self)
|
||||
|
||||
# get the host and evice workspace
|
||||
# get the host and device workspace
|
||||
device_workspace_size = \
|
||||
self.operation.rt_module.get_device_workspace_size(self)
|
||||
|
||||
@@ -1072,7 +1072,7 @@ class GemmOperationBase:
|
||||
self.api = api
|
||||
self.prefix = "3x" if self.api == ApiVersion.v3x else ""
|
||||
|
||||
# use deep copy to avoid overwritting the original TensorDescription
|
||||
# use deep copy to avoid overwriting the original TensorDescription
|
||||
if self.api != ApiVersion.v3x and C.layout == cutlass.ColumnMajor:
|
||||
#: Operand A
|
||||
self.A: TensorDescription = copy.deepcopy(B)
|
||||
@@ -1300,7 +1300,7 @@ class GemmOperationGrouped(GemmOperationBase):
|
||||
super(GemmOperationGrouped, self).__init__(GemmKind.Grouped, arch, tile_description,
|
||||
A, B, C, epilogue_functor, swizzling_functor, **kwargs)
|
||||
assert "precompute_mode" in kwargs.keys(
|
||||
), "missing keyword arguement 'precompute_mode'."
|
||||
), "missing keyword argument 'precompute_mode'."
|
||||
self.precompute_mode = kwargs["precompute_mode"]
|
||||
self.rt_module = GemmRTGrouped(self)
|
||||
self.argument_type = self.rt_module.argument_type
|
||||
|
||||
@@ -713,7 +713,7 @@ class TileDescription:
|
||||
"""
|
||||
:param threadblock_shape: shape of a threadblock tyle
|
||||
:type threadblock_shape: list or tuple
|
||||
:param stages: number of pipline stages in the operation. For SM90 kernels, this can be set to `None` and the maximum
|
||||
:param stages: number of pipeline stages in the operation. For SM90 kernels, this can be set to `None` and the maximum
|
||||
number of stages that can be supported for an operation on a given architecture will be computed at a later time
|
||||
:type stages: int or None
|
||||
:param warp_count: number of warps in each [M, N, K] dimension of a threadblock tile
|
||||
|
||||
@@ -108,7 +108,7 @@ class ReductionArguments:
|
||||
if layout == cutlass.RowMajor:
|
||||
return TensorRef2D_(int(device_ptr), extent[1])
|
||||
else:
|
||||
raise ValueError("unknonwn layout type")
|
||||
raise ValueError("unknown layout type")
|
||||
|
||||
def get_arguments(self):
|
||||
ref_workspace = ReductionArguments.get_tensor_ref(
|
||||
@@ -320,7 +320,7 @@ class ReductionOperation:
|
||||
|
||||
#
|
||||
def procedural_name(self):
|
||||
''' The full procedural name indicates architeture, extended name, tile size'''
|
||||
''' The full procedural name indicates architecture, extended name, tile size'''
|
||||
return self.configuration_name()
|
||||
|
||||
def run(self, arguments: ReductionArguments) -> cuda.CUresult:
|
||||
|
||||
@@ -498,7 +498,7 @@ class Conv2dLauncher:
|
||||
########################################################################################################
|
||||
# TestAllConv: Runs cutlass::conv::device::ImplicitGemmConvolution operator and compares it with reference
|
||||
# TestAllConv runs conv operator on default conv problem sizes from test::conv::device::TestbedConv2dProblemSizes
|
||||
# Additionaly, each conv2d test can provide conv problem sizes (conv_test_sizes) and blacklist of sizes
|
||||
# Additionally, each conv2d test can provide conv problem sizes (conv_test_sizes) and blacklist of sizes
|
||||
# (conv_blacklist_sizes)
|
||||
############################################################################################################
|
||||
|
||||
|
||||
@@ -489,7 +489,7 @@ def test_all_gemm(operation: 'GemmOperationUniversal', testcase="universal"):
|
||||
else:
|
||||
alignment = 128 // minimum_operand_element_size
|
||||
|
||||
# int8_t gemm alignment constrainst
|
||||
# int8_t gemm alignment constraints
|
||||
if opcode_class == cutlass.OpClass.Simt and operation.A.element == cutlass.int8 and operation.A.layout == cutlass.ColumnMajor:
|
||||
alignment_m = 4
|
||||
else:
|
||||
|
||||
@@ -63,7 +63,7 @@ def get_name(layouts, alignments, element_output,
|
||||
Generates a procedural name for a test case.
|
||||
|
||||
:param layouts: indexable container of layouts of A, B, and C operands
|
||||
:param alignments: indexable container of alingments of A, B, and C operands
|
||||
:param alignments: indexable container of alignments of A, B, and C operands
|
||||
:param element_output: data type of the output element
|
||||
:param element_accumulator: data type used in accumulation
|
||||
:param element_epilogue: data type used in computing the epilogue
|
||||
|
||||
Reference in New Issue
Block a user