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
@@ -321,13 +321,13 @@ public:
|
||||
NumericTypeID element_C, /// Data type of C and D matrix
|
||||
|
||||
void const * const * ptr_C_real, /// Pointer to array containing pointers to real part of C matrices
|
||||
void const * const * ptr_C_imag, /// Pointer to array containing poitners to imaginary part of C matrices
|
||||
void const * const * ptr_C_imag, /// Pointer to array containing pointers to imaginary part of C matrices
|
||||
|
||||
int64_t ldc_real, /// Leading dimension of real part of C matrix
|
||||
int64_t ldc_imag, /// Leading dimension of imaginary part of C matrix
|
||||
|
||||
void * const * ptr_D_real, /// Pointer to array containing pointers to real part of D matrices
|
||||
void * const * ptr_D_imag, /// Pointer to array containing poitners to imaginary part of D matrices
|
||||
void * const * ptr_D_imag, /// Pointer to array containing pointers to imaginary part of D matrices
|
||||
|
||||
int64_t ldd_real, /// Leading dimension of real part of D matrix
|
||||
int64_t ldd_imag /// Leading dimension of imaginary part of D matrix
|
||||
|
||||
@@ -518,7 +518,7 @@ struct GemmDescription : public OperationDescription {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Desciprion for structured sparse GEMMs.
|
||||
/// Description for structured sparse GEMMs.
|
||||
struct SparseGemmDescription : public GemmDescription {
|
||||
|
||||
/// Description structure for structured sparse GEMM
|
||||
@@ -1160,7 +1160,7 @@ struct GemmGroupedArguments {
|
||||
// OperationKind: kSparseGemm
|
||||
//
|
||||
|
||||
/// Computes GEMM assumine one of the inputs has 2:4 structured sparsity.
|
||||
/// Computes GEMM assuming one of the inputs has 2:4 structured sparsity.
|
||||
struct SparseGemmConfiguration {
|
||||
|
||||
GemmUniversalMode mode;
|
||||
@@ -1187,7 +1187,7 @@ struct SparseGemmArguments {
|
||||
void const *B; /// pointer to B matrix
|
||||
void const *C; /// pointer to C matrix
|
||||
void *D; /// pointer to D matrix
|
||||
void const *E; /// pointer to E matric (metadata)
|
||||
void const *E; /// pointer to E matrix (metadata)
|
||||
|
||||
void const *alpha; /// pointer to alpha scalar
|
||||
void const *beta; /// pointer to beta scalar
|
||||
@@ -1465,7 +1465,7 @@ struct ConvArguments {
|
||||
/// pointer to implicit gemm matrix C
|
||||
void const *C;
|
||||
|
||||
/// pointer to implicit gemm desitination matrix D
|
||||
/// pointer to implicit gemm destination matrix D
|
||||
void *D;
|
||||
|
||||
/// Host or device pointer to alpha scalar
|
||||
@@ -1487,16 +1487,16 @@ struct ConvArguments {
|
||||
//
|
||||
struct ReductionConfiguration {
|
||||
|
||||
/// Redcution problem size
|
||||
/// Reduction problem size
|
||||
MatrixCoord problem_size;
|
||||
|
||||
/// Number of partitions to reduce
|
||||
int partitions;
|
||||
|
||||
/// Number of lements between each partition
|
||||
/// Number of elements between each partition
|
||||
int64_t partition_stride;
|
||||
|
||||
/// leading dimension of 'w'orksace operand
|
||||
/// leading dimension of 'w'orkspace operand
|
||||
int64_t ldw;
|
||||
|
||||
/// leading dimension of 's'ource operand
|
||||
|
||||
@@ -89,7 +89,7 @@ def CreateGemmOperator(manifest, layouts, tile_descriptions, data_type, \
|
||||
return operations
|
||||
|
||||
|
||||
# Generates 3.0 API based GemmUniversal API kernels. Alignment constraits are folded in with layouts
|
||||
# Generates 3.0 API based GemmUniversal API kernels. Alignment constraints are folded in with layouts
|
||||
def CreateGemmUniversal3xOperator(
|
||||
manifest, layouts, tile_descriptions, data_type,
|
||||
complex_transforms=None,
|
||||
@@ -4831,7 +4831,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument("--architectures", default='53;60;61;70;75;80', help="Target compute architectures")
|
||||
parser.add_argument("--kernels", default='', help='Comma delimited list to filter kernels by name.')
|
||||
parser.add_argument("--ignore-kernels", default='', help='Comma delimited list of kernels to exclude from build.')
|
||||
parser.add_argument("--filter-by-cc", default='True', type=str, help='If enabled, kernels whose comupte capability range is not satisfied by the build target are excluded.')
|
||||
parser.add_argument("--filter-by-cc", default='True', type=str, help='If enabled, kernels whose compute capability range is not satisfied by the build target are excluded.')
|
||||
parser.add_argument("--cuda-version", default="11.0.0", help="Semantic version string of CUDA Toolkit")
|
||||
parser.add_argument('--kernel-filter-file', type=str, default=None, required=False, help='Full path of filter file')
|
||||
parser.add_argument('--selected-kernel-list', type=str, default=None, required=False,
|
||||
|
||||
@@ -83,7 +83,7 @@ The tiling size of above operations can also be customized.
|
||||
### Using Docker
|
||||
We recommend using one of our provided Docker images for using PyCUTLASS.
|
||||
|
||||
**To run CUTLASS 3 GEMM kernels targetting the NVIDIA Hopper architecture via PyCUTLASS,** you can use an included [Dockerfile](docker/Dockerfile-cuda12.0) based on the NGC CUDA 12.0 container:
|
||||
**To run CUTLASS 3 GEMM kernels targeting the NVIDIA Hopper architecture via PyCUTLASS,** you can use an included [Dockerfile](docker/Dockerfile-cuda12.0) based on the NGC CUDA 12.0 container:
|
||||
```shell
|
||||
docker build -t pycutlass-cuda12.0:latest -f docker/Dockerfile-cuda12.0 .
|
||||
docker run --gpus all -it --rm pycutlass-cuda12.0:latest
|
||||
@@ -91,7 +91,7 @@ docker run --gpus all -it --rm pycutlass-cuda12.0:latest
|
||||
Note that this Docker container does not include CuPy or PyTorch, and, thus, will not be able to run PyCUTLASS examples that
|
||||
leverage these packages.
|
||||
|
||||
**To run CUTLASS 2.x kernels targetting pre-SM90 architectures via PyCUTLASS,** you can use an included [Dockerfile](docker/Dockerfile-cuda11.8-pytorch) based on an NGC PyTorch container:
|
||||
**To run CUTLASS 2.x kernels targeting pre-SM90 architectures via PyCUTLASS,** you can use an included [Dockerfile](docker/Dockerfile-cuda11.8-pytorch) based on an NGC PyTorch container:
|
||||
```shell
|
||||
docker build -t pycutlass-cuda11.8-pytorch:latest -f docker/Dockerfile-cuda11.8-pytorch .
|
||||
docker run --gpus all -it --rm pycutlass-cuda11.8-pytorch:latest
|
||||
|
||||
@@ -10,7 +10,7 @@ PyCUTLASS handles the following things when launch the CUTLASS kernels
|
||||
|
||||
## Memory management
|
||||
|
||||
PyCUTLASS uses [RMM](https://github.com/rapidsai/rmm) to manage device memory. At the begining of the program, call
|
||||
PyCUTLASS uses [RMM](https://github.com/rapidsai/rmm) to manage device memory. At the beginning of the program, call
|
||||
```python
|
||||
pycutlass.get_memory_pool({init_pool_size_in_bytes}, {max_pool_size_in_bytes})
|
||||
```
|
||||
@@ -41,7 +41,7 @@ The `{instruction_shape}` and `{opclass}` defines the instruction size and type.
|
||||
|Opclass | element_a/element_b | element_acc | instruction_shape | math_operation |
|
||||
| -- | -- | -- | -- | -- |
|
||||
| cutlass.OpClass.TensorOp | cutlass.float64 | cutlass.float64 | [8, 8, 4] | MathOperation.multiply_add|
|
||||
| | cutass.float32 cutlass.tfloat32, cutlass.float16 cutlass.bfloat16 | cutlass.float32 | [16, 8, 8] | MathOperation.multiply_add MathOperation.multiply_add_fast_f32 MathOperation.multiply_add_fast_f16 MathOperation.multiply_add_fast_bf16 |
|
||||
| | cutlass.float32 cutlass.tfloat32, cutlass.float16 cutlass.bfloat16 | cutlass.float32 | [16, 8, 8] | MathOperation.multiply_add MathOperation.multiply_add_fast_f32 MathOperation.multiply_add_fast_f16 MathOperation.multiply_add_fast_bf16 |
|
||||
| | cutlass.float16 | cutlass.float16/cutlass.float32|[16, 8, 16]| MathOperation.multiply_add |
|
||||
| | cutlass.bfloat_16 | cutlass.float32 | [16, 8, 16]|MathOperation.multiply_add |
|
||||
| | cutlass.int8 | cutlass.int32 | [16, 8, 32] | MathOperation.multiply_add_saturate|
|
||||
@@ -178,7 +178,7 @@ import pycutlass
|
||||
|
||||
pycutlass.compiler.add_module([operation,])
|
||||
```
|
||||
Several operations can be compiled togather. The `nvcc` at `$CUDA_INSTALL_PATH/bin` is used by default as the compiler backend. But you can also switch to [CUDA Python](https://nvidia.github.io/cuda-python/overview.html)'s `nvrtc` with
|
||||
Several operations can be compiled together. The `nvcc` at `$CUDA_INSTALL_PATH/bin` is used by default as the compiler backend. But you can also switch to [CUDA Python](https://nvidia.github.io/cuda-python/overview.html)'s `nvrtc` with
|
||||
```python
|
||||
pycutlass.compiler.nvrtc()
|
||||
```
|
||||
@@ -249,7 +249,7 @@ arguments = Conv2dArguments(
|
||||
* `split_k_mode`: currently we support `cutlass.conv.SplitKMode.Serial` and `cutlass.conv.SplitKMode.Parallel`.
|
||||
* `split_k_slice`: number of split-k slices
|
||||
|
||||
For ordianry conv2d, just use `cutlass.conv.SplitKMode.Serial` with `split_k_slice=1`.
|
||||
For ordinary conv2d, just use `cutlass.conv.SplitKMode.Serial` with `split_k_slice=1`.
|
||||
|
||||
### Getting output_op
|
||||
The way to create output_op is listed below
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -52,7 +52,7 @@ def add_test(cls, layouts, alignments, element_output, element_accumulator, elem
|
||||
:param cls: class to which the generated method will be added
|
||||
:type cls: type
|
||||
: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
|
||||
|
||||
@@ -42,7 +42,7 @@ from pycutlass.test.gemm_testbed import test_all_gemm
|
||||
from pycutlass.utils.device import device_cc
|
||||
|
||||
|
||||
# Partial specialziation for naming tests
|
||||
# Partial specialization for naming tests
|
||||
name_fn = partial(get_name, element_a=cutlass.float16, element_b=cutlass.float16, arch=90)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ def add_test(cls, layouts, alignments, element_output, element_accumulator, elem
|
||||
:param cls: class to which the generated method will be added
|
||||
:type cls: type
|
||||
: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
|
||||
|
||||
@@ -52,7 +52,7 @@ def add_test(cls, layouts, alignments, element_output, element_accumulator, elem
|
||||
:param cls: class to which the generated method will be added
|
||||
:type cls: type
|
||||
: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
|
||||
|
||||
@@ -52,7 +52,7 @@ def add_test(cls, layouts, alignments, element_output, element_accumulator, elem
|
||||
:param cls: class to which the generated method will be added
|
||||
:type cls: type
|
||||
: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
|
||||
|
||||
@@ -358,7 +358,7 @@ public:
|
||||
<< operator_args.problem_size << std::endl
|
||||
<< " split_k_mode: "
|
||||
<< (operator_args.split_k_mode == cutlass::conv::SplitKMode::kSerial ? "serial" : "parallel") << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.output_op.alpha << ", "
|
||||
<< operator_args.output_op.beta << std::endl
|
||||
<< " ref_A (ptr, {stride}): "
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
<< operator_args.problem_size << std::endl
|
||||
<< " split_k_mode: "
|
||||
<< (operator_args.split_k_mode == cutlass::conv::SplitKMode::kSerial ? "serial" : "parallel") << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.output_op.alpha << ", "
|
||||
<< operator_args.output_op.beta << std::endl
|
||||
<< " ref_A (ptr, {stride}): "
|
||||
|
||||
@@ -349,7 +349,7 @@ public:
|
||||
<< operator_args.problem_size << std::endl
|
||||
<< " split_k_mode: "
|
||||
<< (operator_args.split_k_mode == cutlass::conv::SplitKMode::kSerial ? "serial" : "parallel") << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.output_op.alpha << ", "
|
||||
<< operator_args.output_op.beta << std::endl
|
||||
<< " ref_A (ptr, {stride}): "
|
||||
|
||||
@@ -908,13 +908,13 @@ Status Handle::gemm_planar_complex_array(
|
||||
NumericTypeID element_C, /// Data type of C and D matrix
|
||||
|
||||
void const * const * ptr_C_real, /// Pointer to array containing pointers to real part of C matrices
|
||||
void const * const * ptr_C_imag, /// Pointer to array containing poitners to imaginary part of C matrices
|
||||
void const * const * ptr_C_imag, /// Pointer to array containing pointers to imaginary part of C matrices
|
||||
|
||||
int64_t ldc_real, /// Leading dimension of real part of C matrix
|
||||
int64_t ldc_imag, /// Leading dimension of imaginary part of C matrix
|
||||
|
||||
void * const * ptr_D_real, /// Pointer to array containing pointers to real part of D matrices
|
||||
void * const * ptr_D_imag, /// Pointer to array containing poitners to imaginary part of D matrices
|
||||
void * const * ptr_D_imag, /// Pointer to array containing pointers to imaginary part of D matrices
|
||||
|
||||
int64_t ldd_real, /// Leading dimension of real part of D matrix
|
||||
int64_t ldd_imag /// Leading dimension of imaginary part of D matrix
|
||||
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
std::cout << "Rank2KOperation::OperatorArguments" << std::endl
|
||||
<< " problem_size:" << std::endl
|
||||
<< operator_args.problem_size << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.epilogue.alpha << ", "
|
||||
<< operator_args.epilogue.beta << std::endl
|
||||
<< " ref_A (ptr, {stride}): "
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
<< operator_args.partitions << std::endl
|
||||
<< " partition_stride: "
|
||||
<< operator_args.partition_stride << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.output.alpha << ", "
|
||||
<< operator_args.output.beta << std::endl
|
||||
<< " workspace (ptr, stride): "
|
||||
|
||||
@@ -74,7 +74,7 @@ template <
|
||||
>
|
||||
struct ConvReferenceDispatcher;
|
||||
|
||||
/// Dispatcher for Conv2d (partially specialied for kConvDim == 2)
|
||||
/// Dispatcher for Conv2d (partially specialized for kConvDim == 2)
|
||||
template <
|
||||
Provider kProvider,
|
||||
conv::Operator kConvolutionalOperator,
|
||||
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
std::cout << "SymmOperation::OperatorArguments" << std::endl
|
||||
<< " problem_size:" << std::endl
|
||||
<< operator_args.problem_size << std::endl
|
||||
<< " epilouge (alpha, beta): "
|
||||
<< " epilogue (alpha, beta): "
|
||||
<< operator_args.epilogue.alpha << ", "
|
||||
<< operator_args.epilogue.beta << std::endl
|
||||
<< " ref_A (ptr, {stride}): "
|
||||
|
||||
@@ -428,7 +428,7 @@ static struct {
|
||||
NumericTypeID enumerant;
|
||||
}
|
||||
NumericTypeID_enumerants[] = {
|
||||
{"unknown", "<unkown>", NumericTypeID::kUnknown},
|
||||
{"unknown", "<unknown>", NumericTypeID::kUnknown},
|
||||
{"void", "Void", NumericTypeID::kVoid},
|
||||
{"b1", "B1", NumericTypeID::kB1},
|
||||
{"u2", "U2", NumericTypeID::kU2},
|
||||
@@ -465,7 +465,7 @@ NumericTypeID_enumerants[] = {
|
||||
{"cs16", "CS16", NumericTypeID::kCS16},
|
||||
{"cs32", "CS32", NumericTypeID::kCS32},
|
||||
{"cs64", "CS64", NumericTypeID::kCS64},
|
||||
{"*", "<unkown/enumerate all>", NumericTypeID::kUnknown}
|
||||
{"*", "<unknown/enumerate all>", NumericTypeID::kUnknown}
|
||||
};
|
||||
|
||||
/// Converts a NumericTypeID enumerant to a string
|
||||
@@ -958,7 +958,7 @@ static struct {
|
||||
ConvKind enumerant;
|
||||
}
|
||||
ConvKind_enumerants[] = {
|
||||
{"unknown", "<unkown>", ConvKind::kUnknown},
|
||||
{"unknown", "<unknown>", ConvKind::kUnknown},
|
||||
{"fprop", "<fprop>", ConvKind::kFprop},
|
||||
{"dgrad", "<dgrad>", ConvKind::kDgrad},
|
||||
{"wgrad", "<wgrad>", ConvKind::kWgrad},
|
||||
|
||||
@@ -270,7 +270,7 @@ Status Conv2dOperationProfiler::initialize_configuration(
|
||||
}
|
||||
|
||||
//////////////////////// Convolution output dimensions p and q ////////////////////////
|
||||
// Cutlass convolutions support arbitrary output sizes and not constriant by //
|
||||
// Cutlass convolutions support arbitrary output sizes and not constrained by //
|
||||
// input, filter, padding, striding, dilation sizes. //
|
||||
// cuDNN sets the output dimensions (p, q) using following equations: //
|
||||
// //
|
||||
@@ -502,7 +502,7 @@ void Conv2dOperationProfiler::initialize_result_(
|
||||
// Bytes of activation, filter, and output tensors
|
||||
result.bytes = problem_.bytes(operation_desc);
|
||||
|
||||
// Theoritical flops required for the computation
|
||||
// Theoretical flops required for the computation
|
||||
result.flops = problem_.flops(operation_desc);
|
||||
|
||||
// Measured runtime
|
||||
@@ -510,7 +510,7 @@ void Conv2dOperationProfiler::initialize_result_(
|
||||
|
||||
}
|
||||
|
||||
/// Initialize reduction problem dimenstions and library::Operation
|
||||
/// Initialize reduction problem dimensions and library::Operation
|
||||
bool Conv2dOperationProfiler::initialize_reduction_configuration_(
|
||||
Options const &options,
|
||||
PerformanceReport &report,
|
||||
@@ -535,7 +535,7 @@ bool Conv2dOperationProfiler::initialize_reduction_configuration_(
|
||||
/// This chooses the appropriate stride element of the row-major C tensor.
|
||||
int const & tensor_c_stride_idx = (conv_kind == library::ConvKind::kWgrad ? 2 : 0);
|
||||
|
||||
/// intialize library::ReductionConfiguration
|
||||
/// initialize library::ReductionConfiguration
|
||||
conv_workspace_.reduction_configuration.problem_size = problem_.eq_gemm_size(conv_kind).mn();
|
||||
conv_workspace_.reduction_configuration.partitions = int(problem_.split_k_slices);
|
||||
conv_workspace_.reduction_configuration.partition_stride = problem_.eq_gemm_size(conv_kind).mn().product();
|
||||
@@ -773,7 +773,7 @@ bool Conv2dOperationProfiler::verify_cutlass(
|
||||
conv_workspace_.arguments.alpha = problem_.alpha_one.data();
|
||||
conv_workspace_.arguments.beta = problem_.beta_zero.data();
|
||||
|
||||
/// intialize library::ReductionArguments
|
||||
/// initialize library::ReductionArguments
|
||||
conv_workspace_.reduction_arguments.workspace = conv_workspace_.device_workspace.data();
|
||||
conv_workspace_.reduction_arguments.source = conv_workspace_.C->data();
|
||||
conv_workspace_.reduction_arguments.destination = conv_workspace_.Computed->data();
|
||||
@@ -961,7 +961,7 @@ bool Conv2dOperationProfiler::verify_with_host_reference_(
|
||||
conv_desc.tile_description.math_instruction.element_accumulator,
|
||||
conv_desc.element_epilogue);
|
||||
|
||||
#if 0 // debug print to check which host refererence instance is selected
|
||||
#if 0 // debug print to check which host reference instance is selected
|
||||
std::cout << conv2d_key << "\n";
|
||||
#endif
|
||||
|
||||
@@ -982,7 +982,7 @@ bool Conv2dOperationProfiler::verify_with_host_reference_(
|
||||
return true;
|
||||
}
|
||||
|
||||
// host refernce has only one instances in Conv2dOperationVectorMap
|
||||
// host reference has only one instances in Conv2dOperationVectorMap
|
||||
library::Operation const *reference_op = cc_it->second[0];
|
||||
|
||||
//
|
||||
@@ -1009,7 +1009,7 @@ bool Conv2dOperationProfiler::verify_with_host_reference_(
|
||||
conv_workspace_.arguments.pointer_mode = library::ScalarPointerMode::kHost;
|
||||
|
||||
//
|
||||
// Intialize host reference operation
|
||||
// Initialize host reference operation
|
||||
//
|
||||
std::vector<uint8_t> host_workspace_reference_op;
|
||||
|
||||
@@ -1114,11 +1114,11 @@ bool Conv2dOperationProfiler::verify_with_device_reference_(
|
||||
return true;
|
||||
}
|
||||
|
||||
// device refernce has only one instances in Conv2dOperationVectorMap
|
||||
// device reference has only one instances in Conv2dOperationVectorMap
|
||||
library::Operation const *reference_op = cc_it->second[0];
|
||||
|
||||
//
|
||||
// Intialize device reference operation
|
||||
// Initialize device reference operation
|
||||
//
|
||||
std::vector<uint8_t> host_workspace_reference_op;
|
||||
|
||||
@@ -1205,7 +1205,7 @@ bool Conv2dOperationProfiler::profile(
|
||||
conv_workspace_.arguments.alpha = problem_.alpha_one.data();
|
||||
conv_workspace_.arguments.beta = problem_.beta_zero.data();
|
||||
|
||||
/// intialize library::ReductionArguments
|
||||
/// initialize library::ReductionArguments
|
||||
conv_workspace_.reduction_arguments.workspace = conv_workspace_.device_workspace.data();
|
||||
conv_workspace_.reduction_arguments.source = conv_workspace_.C->data();
|
||||
conv_workspace_.reduction_arguments.destination = conv_workspace_.Computed->data();
|
||||
@@ -1276,7 +1276,7 @@ Status Conv2dOperationProfiler::profile_cutlass_(
|
||||
// update library::ConvArguments for parallel split-k reduction
|
||||
conv_arguments->D = conv_workspace_.device_workspace.data();
|
||||
|
||||
/// intialize library::ReductionArguments
|
||||
/// initialize library::ReductionArguments
|
||||
conv_workspace_.reduction_arguments.workspace = conv_workspace_.device_workspace.data();
|
||||
conv_workspace_.reduction_arguments.source = conv_workspace_.C->batch_data(problem_idx);
|
||||
conv_workspace_.reduction_arguments.destination = conv_workspace_.Computed->batch_data(problem_idx);
|
||||
@@ -1329,7 +1329,7 @@ Status Conv2dOperationProfiler::profile_cutlass_(
|
||||
// update library::ConvArguments for parallel split-k reduction
|
||||
conv_arguments->D = conv_workspace_.device_workspace.data();
|
||||
|
||||
/// intialize library::ReductionArguments
|
||||
/// initialize library::ReductionArguments
|
||||
conv_workspace_.reduction_arguments.workspace = conv_workspace_.device_workspace.data();
|
||||
conv_workspace_.reduction_arguments.source = conv_workspace_.C->batch_data(problem_idx);
|
||||
conv_workspace_.reduction_arguments.destination = conv_workspace_.Computed->batch_data(problem_idx);
|
||||
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix A
|
||||
// Returns leading dimension for equivalent gemm matrix A
|
||||
int64_t eq_gemm_lda(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix B
|
||||
// Returns leading dimension for equivalent gemm matrix B
|
||||
int64_t eq_gemm_ldb(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix C
|
||||
// Returns leading dimension for equivalent gemm matrix C
|
||||
int64_t eq_gemm_ldc(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -436,7 +436,7 @@ protected:
|
||||
void *device_workspace);
|
||||
|
||||
|
||||
/// Initialize reduction problem dimenstions and library::Operation
|
||||
/// Initialize reduction problem dimensions and library::Operation
|
||||
bool initialize_reduction_configuration_(
|
||||
Options const &options,
|
||||
PerformanceReport &report,
|
||||
|
||||
@@ -284,7 +284,7 @@ Status Conv3dOperationProfiler::initialize_configuration(
|
||||
}
|
||||
|
||||
//////////////////////// Convolution output dimensions p and q ////////////////////////
|
||||
// Cutlass convolutions support arbitrary output sizes and not constriant by //
|
||||
// Cutlass convolutions support arbitrary output sizes and not constrained by //
|
||||
// input, filter, padding, striding, dilation sizes. //
|
||||
// cuDNN sets the output dimensions (p, q) using following equations: //
|
||||
// //
|
||||
@@ -545,7 +545,7 @@ void Conv3dOperationProfiler::initialize_result_(
|
||||
// Bytes of activation, filter, and output tensors
|
||||
result.bytes = problem_.bytes(operation_desc);
|
||||
|
||||
// Theoritical flops required for the computation
|
||||
// Theoretical flops required for the computation
|
||||
result.flops = problem_.flops(operation_desc);
|
||||
|
||||
// Measured runtime
|
||||
@@ -553,7 +553,7 @@ void Conv3dOperationProfiler::initialize_result_(
|
||||
|
||||
}
|
||||
|
||||
/// Initialize reduction problem dimenstions and library::Operation
|
||||
/// Initialize reduction problem dimensions and library::Operation
|
||||
bool Conv3dOperationProfiler::initialize_reduction_configuration_(
|
||||
Options const &options,
|
||||
PerformanceReport &report,
|
||||
@@ -578,7 +578,7 @@ bool Conv3dOperationProfiler::initialize_reduction_configuration_(
|
||||
/// This chooses the appropriate stride element of the row-major C tensor.
|
||||
int const & tensor_c_stride_idx = (conv_kind == library::ConvKind::kWgrad ? 3 : 0);
|
||||
|
||||
/// intialize library::ReductionConfiguration
|
||||
/// initialize library::ReductionConfiguration
|
||||
conv_workspace_.reduction_configuration.problem_size = problem_.eq_gemm_size(conv_kind).mn();
|
||||
conv_workspace_.reduction_configuration.partitions = int(problem_.split_k_slices);
|
||||
conv_workspace_.reduction_configuration.partition_stride = problem_.eq_gemm_size(conv_kind).mn().product();
|
||||
@@ -947,7 +947,7 @@ bool Conv3dOperationProfiler::verify_with_host_reference_(
|
||||
conv_desc.tile_description.math_instruction.element_accumulator,
|
||||
conv_desc.element_epilogue);
|
||||
|
||||
#if 0 // debug print to check which host refererence instance is selected
|
||||
#if 0 // debug print to check which host reference instance is selected
|
||||
std::cout << conv_key << "\n";
|
||||
#endif
|
||||
|
||||
@@ -968,7 +968,7 @@ bool Conv3dOperationProfiler::verify_with_host_reference_(
|
||||
return true;
|
||||
}
|
||||
|
||||
// host refernce has only one instances in ConvOperationVectorMap
|
||||
// host reference has only one instances in ConvOperationVectorMap
|
||||
library::Operation const *reference_op = cc_it->second[0];
|
||||
|
||||
//
|
||||
@@ -993,7 +993,7 @@ bool Conv3dOperationProfiler::verify_with_host_reference_(
|
||||
conv_workspace_.arguments.pointer_mode = library::ScalarPointerMode::kHost;
|
||||
|
||||
//
|
||||
// Intialize host reference operation
|
||||
// Initialize host reference operation
|
||||
//
|
||||
std::vector<uint8_t> host_workspace_reference_op;
|
||||
|
||||
@@ -1109,7 +1109,7 @@ void Conv3dOperationProfiler::set_cutlass_operator_arguments_(int problem_idx) {
|
||||
conv_workspace_.arguments.alpha = problem_.alpha_one.data();
|
||||
conv_workspace_.arguments.beta = problem_.beta_zero.data();
|
||||
|
||||
/// intialize library::ReductionArguments
|
||||
/// initialize library::ReductionArguments
|
||||
conv_workspace_.reduction_arguments.workspace = conv_workspace_.device_workspace.data();
|
||||
conv_workspace_.reduction_arguments.source = conv_workspace_.C->batch_data(problem_idx);
|
||||
conv_workspace_.reduction_arguments.destination = conv_workspace_.Computed->batch_data(problem_idx);
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
/// Total number of flops computed
|
||||
int64_t flops(library::ConvDescription const &operation_desc) const;
|
||||
|
||||
/// Infers output size from theinput size, padding, stride, and dilation
|
||||
/// Infers output size from the input size, padding, stride, and dilation
|
||||
void set_default_output_size() {
|
||||
z = ((d + pad_d - t * dilation_d) / stride_d) + 1;
|
||||
p = ((h + pad_h - r * dilation_h) / stride_h) + 1;
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix A
|
||||
// Returns leading dimension for equivalent gemm matrix A
|
||||
int64_t eq_gemm_lda(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix B
|
||||
// Returns leading dimension for equivalent gemm matrix B
|
||||
int64_t eq_gemm_ldb(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Returns leading dimenstion for equivalent gemm matrix C
|
||||
// Returns leading dimension for equivalent gemm matrix C
|
||||
int64_t eq_gemm_ldc(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -389,7 +389,7 @@ protected:
|
||||
void *host_workspace,
|
||||
void *device_workspace);
|
||||
|
||||
/// Initialize reduction problem dimenstions and library::Operation
|
||||
/// Initialize reduction problem dimensions and library::Operation
|
||||
bool initialize_reduction_configuration_(
|
||||
Options const &options,
|
||||
PerformanceReport &report,
|
||||
|
||||
@@ -57,7 +57,7 @@ Status get_cutlass_status(cublasStatus_t cublas) {
|
||||
return Status::kErrorInternal;
|
||||
}
|
||||
|
||||
/// Converts a cuBLASS status to cutlass::profiler::Disposition
|
||||
/// Converts a cuBLAS status to cutlass::profiler::Disposition
|
||||
Disposition get_cutlass_disposition(cublasStatus_t cublas_status) {
|
||||
|
||||
if (cublas_status == CUBLAS_STATUS_INVALID_VALUE) {
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace profiler {
|
||||
/// Converts a cuBLAS status to cutlass::Status
|
||||
Status get_cutlass_status(cublasStatus_t cublas);
|
||||
|
||||
/// Converts a cuBLASS status to cutlass::profiler::Disposition
|
||||
/// Converts a cuBLAS status to cutlass::profiler::Disposition
|
||||
Disposition get_cutlass_disposition(cublasStatus_t cublas_status);
|
||||
|
||||
/// Maps a CUTLASS tensor layout to a cuBLAS transpose operation
|
||||
@@ -87,7 +87,7 @@ Status cublas_satisfies(library::SymmDescription const &desc);
|
||||
|
||||
/// This is a helper class to create cublasHandle_t automatically on CublasCreate object creation and
|
||||
/// to destroy cublasHandle_t on CublasCreate object destruction.
|
||||
/// Additionaly, it provides implicit cast from CublasCreate's object to cublasHandle_t's object
|
||||
/// Additionally, it provides implicit cast from CublasCreate's object to cublasHandle_t's object
|
||||
class CublasCreate {
|
||||
private:
|
||||
cublasHandle_t handle;
|
||||
@@ -196,7 +196,7 @@ struct cublasGemmExDispatcher {
|
||||
library::GemmUniversalConfiguration configuration;
|
||||
library::GemmUniversalArguments arguments;
|
||||
|
||||
// cublass-specific data structures to fill cublas API call arguments
|
||||
// cublas-specific data structures to fill cublas API call arguments
|
||||
cublasOperation_t trans_A;
|
||||
cublasOperation_t trans_B;
|
||||
cudaDataType_t data_type_A;
|
||||
@@ -237,7 +237,7 @@ struct cublasRankKDispatcher {
|
||||
library::RankKConfiguration configuration;
|
||||
library::RankKArguments arguments;
|
||||
|
||||
// cublass-specific data structures to fill cublas API call arguments
|
||||
// cublas-specific data structures to fill cublas API call arguments
|
||||
cublasOperation_t trans_A;
|
||||
cublasFillMode_t uplo;
|
||||
cudaDataType_t data_type_A;
|
||||
@@ -277,7 +277,7 @@ struct cublasTrmmDispatcher {
|
||||
library::TrmmConfiguration configuration;
|
||||
library::TrmmArguments arguments;
|
||||
|
||||
// cublass-specific data structures to fill cublas API call arguments
|
||||
// cublas-specific data structures to fill cublas API call arguments
|
||||
cublasOperation_t trans_A;
|
||||
cublasSideMode_t side;
|
||||
cublasFillMode_t uplo;
|
||||
@@ -318,7 +318,7 @@ struct cublasSymmDispatcher {
|
||||
library::SymmConfiguration configuration;
|
||||
library::SymmArguments arguments;
|
||||
|
||||
// cublass-specific data structures to fill cublas API call arguments
|
||||
// cublas-specific data structures to fill cublas API call arguments
|
||||
cublasSideMode_t side;
|
||||
cublasFillMode_t uplo;
|
||||
cudaDataType_t data_type_A;
|
||||
|
||||
@@ -68,7 +68,7 @@ Disposition get_cutlass_disposition(cudnnStatus_t cudnn_status) {
|
||||
return Disposition::kFailed;
|
||||
}
|
||||
|
||||
/// Checks cudnnStatus_t converts to cutlas status and returns if Status::kSuccess o.w. throws exception
|
||||
/// Checks cudnnStatus_t converts to cutlass status and returns if Status::kSuccess o.w. throws exception
|
||||
Status checkCudnnErr(cudnnStatus_t cudnn_status) {
|
||||
Status cutlass_status = get_cutlass_status(cudnn_status);
|
||||
if(cutlass_status != Status::kSuccess) {
|
||||
@@ -243,7 +243,7 @@ Status cudnn_satisfies(
|
||||
}
|
||||
|
||||
//////////////////////// Convolution output dimensions p and q ///////////////////////
|
||||
// Cutlass convolutions support arbitrary output dimensions and not constriant by //
|
||||
// Cutlass convolutions support arbitrary output dimensions and not constrained by //
|
||||
// input, filter, padding, striding, dilation sizes. //
|
||||
// cuDNN sets the output dimensions (p, q) using following equations: //
|
||||
// //
|
||||
@@ -373,7 +373,7 @@ Status cudnn_satisfies(
|
||||
}
|
||||
|
||||
//////////////////////// Convolution output dimensions p and q ///////////////////////
|
||||
// Cutlass convolutions support arbitrary output dimensions and not constriant by //
|
||||
// Cutlass convolutions support arbitrary output dimensions and not constrained by //
|
||||
// input, filter, padding, striding, dilation sizes. //
|
||||
// cuDNN sets the output dimensions (p, q) using following equations: //
|
||||
// //
|
||||
|
||||
@@ -55,7 +55,7 @@ Status get_cutlass_status(cudnnStatus_t cudnn_status);
|
||||
/// Converts a cuDNN status to cutlass::profiler::Disposition
|
||||
Disposition get_cutlass_disposition(cudnnStatus_t cudnn_status);
|
||||
|
||||
/// Checks cudnnStatus_t converts to cutlas status and returns if Status::kSuccess o.w. throws exception
|
||||
/// Checks cudnnStatus_t converts to cutlass status and returns if Status::kSuccess o.w. throws exception
|
||||
Status checkCudnnErr(cudnnStatus_t cudnn_status);
|
||||
|
||||
/// Maps a CUTLASS conv mode to a cuDNN conv mode enumeration
|
||||
@@ -82,7 +82,7 @@ float cast_cudnn_compute_type_to_float(library::NumericTypeID type, void const *
|
||||
|
||||
/// This is a helper class to create cudnnHandle_t automatically on CudnnCreate object creation and
|
||||
/// to destroy cudnnHandle_t on CudnnCreate object destruction.
|
||||
/// Additionaly, it provides implicit cast from CudnnCreate's object to cudnnHandle_t's object
|
||||
/// Additionally, it provides implicit cast from CudnnCreate's object to cudnnHandle_t's object
|
||||
class CudnnCreate {
|
||||
private:
|
||||
cudnnHandle_t handle;
|
||||
@@ -162,7 +162,7 @@ struct cudnnConvDispatcher {
|
||||
// Methods
|
||||
//
|
||||
|
||||
// TODO: unify ctor cudnnConvDispatcher for conv2d and conv3d by unifying Conv2dConfigration
|
||||
// TODO: unify ctor cudnnConvDispatcher for conv2d and conv3d by unifying Conv2dConfiguration
|
||||
|
||||
// ctor for conv2d
|
||||
cudnnConvDispatcher(
|
||||
@@ -496,7 +496,7 @@ struct cudnnConvDispatcher {
|
||||
workspace = cutlass::device_memory::allocation<char>(workspace_size_in_bytes);
|
||||
}
|
||||
|
||||
/// Executes Conv2d operater from cudnn library
|
||||
/// Executes Conv2d operator from cudnn library
|
||||
cudnnStatus_t operator()(cudnnHandle_t handle) {
|
||||
|
||||
switch (conv_kind) {
|
||||
@@ -552,7 +552,7 @@ struct cudnnConvDispatcher {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns Actviation Tensor
|
||||
// Returns Activation Tensor
|
||||
void const * activation() const {
|
||||
switch(conv_kind) {
|
||||
case library::ConvKind::kFprop : return arguments.A;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//#define report(x) { std::cout << "\033[31m" << __FILE__ << ":" << __LINE__ << " " << x << "\033[0m" << std::endl; }
|
||||
//#define report(x) {}
|
||||
|
||||
// Enable/Disble Profiler debug prints
|
||||
// Enable/Disable Profiler debug prints
|
||||
//#define DEBUG_PROFILER
|
||||
|
||||
//RED 31m // profiler prints debug messages in red
|
||||
|
||||
@@ -442,12 +442,12 @@ int DeviceAllocation::batch_count() const {
|
||||
return batch_count_;
|
||||
}
|
||||
|
||||
/// Gets the stride (in units of elements) beteween items
|
||||
/// Gets the stride (in units of elements) between items
|
||||
int64_t DeviceAllocation::batch_stride() const {
|
||||
return batch_stride_;
|
||||
}
|
||||
|
||||
/// Gets the stride (in units of bytes) beteween items
|
||||
/// Gets the stride (in units of bytes) between items
|
||||
int64_t DeviceAllocation::batch_stride_bytes() const {
|
||||
return bytes(type_, batch_stride_);
|
||||
}
|
||||
|
||||
@@ -176,10 +176,10 @@ public:
|
||||
/// Gets the number of adjacent tensors in memory
|
||||
int batch_count() const;
|
||||
|
||||
/// Gets the stride (in units of elements) beteween items
|
||||
/// Gets the stride (in units of elements) between items
|
||||
int64_t batch_stride() const;
|
||||
|
||||
/// Gets the stride (in units of bytes) beteween items
|
||||
/// Gets the stride (in units of bytes) between items
|
||||
int64_t batch_stride_bytes() const;
|
||||
|
||||
/// Capacity of allocation in number of elements
|
||||
|
||||
@@ -108,7 +108,7 @@ void GemmOperationProfiler::print_examples(std::ostream &out) const {
|
||||
<< "Run when A is f16 with column-major and B is any datatype with row-major (For column major, use column, col, or n. For row major use, row or t):\n"
|
||||
<< " $ cutlass_profiler --operation=Gemm --A=f16:column --B=*:row\n\n"
|
||||
|
||||
<< "Profile a particular problem size with split K and paralell reduction:\n"
|
||||
<< "Profile a particular problem size with split K and parallel reduction:\n"
|
||||
<< " $ cutlass_profiler --operation=Gemm --split_k_mode=parallel --split_k_slices=2 --m=1024 --n=1024 --k=128\n\n"
|
||||
|
||||
<< "Using various input value distribution:\n"
|
||||
@@ -168,7 +168,7 @@ Status GemmOperationProfiler::GemmProblem::parse(
|
||||
}
|
||||
|
||||
if (!arg_as_SplitKModeID(this->split_k_mode, "split_k_mode", problem_space, problem)) {
|
||||
// defualt value
|
||||
// default value
|
||||
this->split_k_mode = library::SplitKMode::kSerial;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ void GemmOperationProfiler::initialize_result_(
|
||||
|
||||
}
|
||||
|
||||
/// Initialize redution problem dimentions and library::Operation
|
||||
/// Initialize reduction problem dimensions and library::Operation
|
||||
bool GemmOperationProfiler::initialize_reduction_configuration_(
|
||||
library::Operation const *operation,
|
||||
ProblemSpace::Problem const &problem) {
|
||||
@@ -434,7 +434,7 @@ bool GemmOperationProfiler::initialize_reduction_configuration_(
|
||||
gemm_desc.tile_description.math_instruction.element_accumulator, // element workspace
|
||||
gemm_desc.tile_description.math_instruction.element_accumulator, // element accumulator
|
||||
gemm_desc.C.element, // element output
|
||||
gemm_desc.element_epilogue // element coumpute
|
||||
gemm_desc.element_epilogue // element compute
|
||||
);
|
||||
|
||||
auto reduction_it = library::Singleton::get().operation_table.reduction_operations.find(reduction_key);
|
||||
|
||||
@@ -94,7 +94,7 @@ void GpuTimer::stop_and_wait(cudaStream_t stream) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the duration in miliseconds
|
||||
/// Returns the duration in milliseconds
|
||||
double GpuTimer::duration(int iterations) const {
|
||||
|
||||
float avg_ms;
|
||||
|
||||
@@ -62,7 +62,7 @@ struct GpuTimer {
|
||||
/// Records a stop event in the stream and synchronizes on the stream
|
||||
void stop_and_wait(cudaStream_t stream = nullptr);
|
||||
|
||||
/// Returns the duration in miliseconds
|
||||
/// Returns the duration in milliseconds
|
||||
double duration(int iterations = 1) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ protected:
|
||||
/// List of providers used to verify and compare each result
|
||||
ProviderVector verification_providers_;
|
||||
|
||||
/// Model performance result initailized by the operation profiler with workload statistics
|
||||
/// Model performance result initialized by the operation profiler with workload statistics
|
||||
/// and reasonable default state.
|
||||
PerformanceResult model_result_;
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ Options::Initialization::Initialization(cutlass::CommandLine const &cmdline) {
|
||||
enabled = false;
|
||||
}
|
||||
else if (provider != library::Provider::kReferenceHost && provider != library::Provider::kReferenceDevice) {
|
||||
throw std::runtime_error("Unsupported intialization provider specified.");
|
||||
throw std::runtime_error("Unsupported initialization provider specified.");
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -205,7 +205,7 @@ Options::Initialization::Initialization(cutlass::CommandLine const &cmdline) {
|
||||
get_distribution(cmdline, "dist", data_distribution);
|
||||
}
|
||||
else {
|
||||
// profiler choosen data distribution (allowed to change based on numeric types)
|
||||
// profiler chosen data distribution (allowed to change based on numeric types)
|
||||
fix_data_distribution = false;
|
||||
// set uniform data distribution with range [-4, 4]
|
||||
data_distribution.set_uniform(-4, 4, 0);
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
std::vector<std::pair<std::string, std::string>> pivot_tags;
|
||||
|
||||
/// If true, reports status of all kernels including those that were
|
||||
/// not run for the given argumetns
|
||||
/// not run for the given arguments
|
||||
bool report_not_run;
|
||||
|
||||
/// Prints human-readable text to stdout. If false, nothing is written to stdout
|
||||
|
||||
@@ -284,7 +284,7 @@ struct ScalarArgument : public KernelArgument {
|
||||
// Data members
|
||||
//
|
||||
|
||||
/// Set of posible values
|
||||
/// Set of possible values
|
||||
ValueCollection values;
|
||||
|
||||
//
|
||||
@@ -540,7 +540,7 @@ struct IntegerArgument : public KernelArgument {
|
||||
// Data members
|
||||
//
|
||||
|
||||
/// Set of posible values
|
||||
/// Set of possible values
|
||||
RangeCollection ranges;
|
||||
|
||||
//
|
||||
|
||||
@@ -188,7 +188,7 @@ struct CommandLine {
|
||||
for (int i = 0; i < keys.size(); ++i) {
|
||||
if (keys[i] == string(arg_name)) {
|
||||
string val_string(values[i]);
|
||||
seperate_string(val_string, vals, sep);
|
||||
separate_string(val_string, vals, sep);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ struct CommandLine {
|
||||
range != ranges.end(); ++range) {
|
||||
|
||||
std::vector<std::string> range_vals;
|
||||
seperate_string(*range, range_vals, sep);
|
||||
separate_string(*range, range_vals, sep);
|
||||
vals.push_back(range_vals);
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,7 @@ struct CommandLine {
|
||||
}
|
||||
|
||||
template <typename value_t>
|
||||
static void seperate_string(std::string const& str,
|
||||
static void separate_string(std::string const& str,
|
||||
std::vector<value_t>& vals,
|
||||
char sep = ',') {
|
||||
std::istringstream str_stream(str);
|
||||
|
||||
@@ -314,7 +314,7 @@ __global__ void groupnorm_twopass_multiple_load(T* output,
|
||||
}
|
||||
|
||||
//ref_input & ref_output should be [N, H, W, C]
|
||||
//ref_gamma & ref_beta shoud be [1, 1, 1, C]
|
||||
//ref_gamma & ref_beta should be [1, 1, 1, C]
|
||||
template <typename T>
|
||||
void groupnorm(cutlass::Tensor4DCoord input_size,
|
||||
const int num_groups,
|
||||
|
||||
@@ -109,9 +109,9 @@ __global__ void nhwc_padding_channel_3To4_kernel(const int32_t n,
|
||||
shm[threadIdx.x] = tidx >= max_input_element ? zero_io : input[tidx];
|
||||
__syncthreads();
|
||||
|
||||
const int ouput_offset = blockIdx.x * 256;
|
||||
const int lower_bound = max_output_element < ouput_offset + 256 ? max_output_element : ouput_offset + 256;
|
||||
for (int i = ouput_offset + threadidx, j = threadidx ; i < lower_bound ; i+=192, j+=192)
|
||||
const int output_offset = blockIdx.x * 256;
|
||||
const int lower_bound = max_output_element < output_offset + 256 ? max_output_element : output_offset + 256;
|
||||
for (int i = output_offset + threadidx, j = threadidx ; i < lower_bound ; i+=192, j+=192)
|
||||
{
|
||||
const Telement* shm_element = (const Telement*)shm + j*3*element_in_Tio/4;
|
||||
Telement array[element_in_Tio];
|
||||
@@ -140,9 +140,9 @@ __global__ void nhwc_padding_channel_3To8_kernel(const int32_t n,
|
||||
shm[threadIdx.x] = tidx >= max_input_element ? zero_io : input[tidx];
|
||||
__syncthreads();
|
||||
|
||||
const int ouput_offset = blockIdx.x * 512;
|
||||
const int lower_bound = max_output_element < ouput_offset + 512 ? max_output_element : ouput_offset + 512;
|
||||
for (int i = ouput_offset + threadidx, j = threadidx ; i < lower_bound ; i+=192, j+=192)
|
||||
const int output_offset = blockIdx.x * 512;
|
||||
const int lower_bound = max_output_element < output_offset + 512 ? max_output_element : output_offset + 512;
|
||||
for (int i = output_offset + threadidx, j = threadidx ; i < lower_bound ; i+=192, j+=192)
|
||||
{
|
||||
const Telement* shm_element = (const Telement*)shm + (element_in_Tio == 4 ? j/2 : j)*3;
|
||||
Telement array[element_in_Tio];
|
||||
|
||||
@@ -74,7 +74,7 @@ _ConvertSMVer2Cores(int major, int minor)
|
||||
// Defines for GPU Architecture types (using the SM version to determine
|
||||
// the # of cores per SM
|
||||
typedef struct {
|
||||
int SM; // 0xMm (hexidecimal notation), M = SM Major version,
|
||||
int SM; // 0xMm (hexadecimal notation), M = SM Major version,
|
||||
// and m = SM minor version
|
||||
int Cores;
|
||||
} sSMtoCores;
|
||||
|
||||
@@ -248,7 +248,7 @@ struct Gemm<ElementA, LayoutA, ElementB, LayoutB, ElementC, LayoutC, ScalarType,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Parital specialization for XOR-popc
|
||||
/// Partial specialization for XOR-popc
|
||||
template <typename ElementA, typename LayoutA, typename ElementB,
|
||||
typename LayoutB, typename ElementC, typename LayoutC,
|
||||
typename ScalarType, typename AccumulatorType>
|
||||
|
||||
@@ -72,7 +72,7 @@ struct TensorForEachHelper {
|
||||
template <typename Func, int Rank>
|
||||
struct TensorForEachHelper<Func, Rank, 0> {
|
||||
|
||||
/// Constructor for fastest chaning rank
|
||||
/// Constructor for fastest changing rank
|
||||
__inline__ __device__
|
||||
TensorForEachHelper(Func &func, Coord<Rank> const &size, Coord<Rank> &coord, int64_t index) {
|
||||
|
||||
|
||||
@@ -1308,7 +1308,7 @@ void TensorFill(
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Fills a tensor's digonal with 1 and 0 everywhere else.
|
||||
/// Fills a tensor's diagonal with 1 and 0 everywhere else.
|
||||
template <
|
||||
typename Element, ///< Element type
|
||||
typename Layout> ///< Layout function
|
||||
|
||||
@@ -133,4 +133,4 @@ struct BlockForEach {
|
||||
|
||||
} // namespace device
|
||||
} // namespace reference
|
||||
} // namesace cutlass
|
||||
} // namespace cutlass
|
||||
|
||||
@@ -335,7 +335,7 @@ struct Gemm<ElementA, LayoutA, ElementB, LayoutB, ElementC, LayoutC, ScalarType,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Parital specialization for XOR-popc
|
||||
/// Partial specialization for XOR-popc
|
||||
template <typename ElementA, typename LayoutA, typename ElementB,
|
||||
typename LayoutB, typename ElementC, typename LayoutC,
|
||||
typename ScalarType, typename ComputeType>
|
||||
|
||||
@@ -992,7 +992,7 @@ void TensorFillDiagonal(
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// Helper to fill a tensor's digonal with 1 and 0 everywhere else.
|
||||
/// Helper to fill a tensor's diagonal with 1 and 0 everywhere else.
|
||||
template <
|
||||
typename Element, ///< Element type
|
||||
typename Layout> ///< Layout function
|
||||
|
||||
@@ -69,7 +69,7 @@ struct TensorForEachHelper<Func, Rank, 0> {
|
||||
/// Index of the active rank
|
||||
static int const kActiveRank = Rank - 1;
|
||||
|
||||
/// Constructor for fastest chaning rank
|
||||
/// Constructor for fastest changing rank
|
||||
TensorForEachHelper(
|
||||
Func &func,
|
||||
Coord<Rank> const &extent,
|
||||
|
||||
Reference in New Issue
Block a user