Unverified Commit 5ea40abf authored by AllentDan's avatar AllentDan Committed by GitHub
Browse files

use format-11.1 (#38)

* format-11.1

* md-link-config
parent 9bbd39b7
......@@ -18,7 +18,8 @@
namespace turbomind {
enum IA3_config {
enum IA3_config
{
KEY_ADAPTER = 1 << 0,
VALUE_ADAPTER = 1 << 1,
MLP_ADAPTER = 1 << 2,
......
......@@ -35,7 +35,8 @@
namespace turbomind {
typedef enum datatype_enum {
typedef enum datatype_enum
{
TYPE_INVALID,
TYPE_BOOL,
TYPE_UINT8,
......@@ -98,7 +99,8 @@ DataType getTensorType()
}
}
typedef enum memorytype_enum {
typedef enum memorytype_enum
{
MEMORY_CPU,
MEMORY_CPU_PINNED,
MEMORY_GPU
......
......@@ -20,7 +20,8 @@
namespace turbomind {
enum class ActivationType {
enum class ActivationType
{
Gelu,
Relu,
Silu,
......
......@@ -49,13 +49,15 @@
namespace turbomind {
enum class AllocatorType {
enum class AllocatorType
{
CUDA,
TF,
TH
};
enum class ReallocType {
enum class ReallocType
{
INCREASE,
REUSE,
DECREASE,
......
......@@ -35,7 +35,8 @@ namespace turbomind {
const float FP8_E4M3_MAX = 480.0f;
enum QUANTIZE_MODE {
enum QUANTIZE_MODE
{
PER_CHANNEL,
PER_TENSOR,
PER_CHANNEL_WEIGHT_PER_TENSOR_ACT
......
......@@ -46,7 +46,8 @@ half4;
/* **************************** type definition ***************************** */
enum CublasDataType {
enum CublasDataType
{
FLOAT_DATATYPE = 0,
HALF_DATATYPE = 1,
BFLOAT16_DATATYPE = 2,
......@@ -54,7 +55,8 @@ enum CublasDataType {
FP8_DATATYPE = 4
};
enum FtCudaDataType {
enum FtCudaDataType
{
FP32 = 0,
FP16 = 1,
BF16 = 2,
......@@ -62,7 +64,8 @@ enum FtCudaDataType {
FP8 = 4
};
enum class OperationType {
enum class OperationType
{
FP32,
FP16,
BF16,
......
......@@ -47,7 +47,8 @@ namespace turbomind {
// A wrapper of cublas or cusparse matrix operator.
// - GEMM_OP_N = CUBLAS_OP_N or CUSPARSE_OP_N
// - GEMM_OP_T = CUBLAS_OP_T or CUSPARSE_OP_T
enum GemmOp {
enum GemmOp
{
GEMM_OP_N,
GEMM_OP_T
};
......
......@@ -639,7 +639,8 @@ void generate_gpt_gemm_config(int batch_size,
cudaStream_t streams[1] = {stream};
CHECK_CUSPARSE(cusparseLtStructuredDescriptorInit(
&handle, &mat_A, m, k, m, alignment, CUDA_R_16F, order, CUSPARSELT_SPARSITY_50_PERCENT))
CHECK_CUSPARSE(cusparseLtDenseDescriptorInit(&handle, &mat_B, k, n, k, alignment, CUDA_R_16F, order))
CHECK_CUSPARSE(
cusparseLtDenseDescriptorInit(&handle, &mat_B, k, n, k, alignment, CUDA_R_16F, order))
CHECK_CUSPARSE(
cusparseLtDenseDescriptorInit(&handle, &mat_C, m, n, m, alignment, CUDA_R_16F, order))
cudaDeviceSynchronize();
......
......@@ -638,7 +638,8 @@ void generate_t5_gemm_config(int batch_size,
cudaStream_t streams[1] = {stream};
CHECK_CUSPARSE(cusparseLtStructuredDescriptorInit(
&handle, &mat_A, m, k, m, alignment, CUDA_R_16F, order, CUSPARSELT_SPARSITY_50_PERCENT))
CHECK_CUSPARSE(cusparseLtDenseDescriptorInit(&handle, &mat_B, k, n, k, alignment, CUDA_R_16F, order))
CHECK_CUSPARSE(
cusparseLtDenseDescriptorInit(&handle, &mat_B, k, n, k, alignment, CUDA_R_16F, order))
CHECK_CUSPARSE(
cusparseLtDenseDescriptorInit(&handle, &mat_C, m, n, m, alignment, CUDA_R_16F, order))
cudaDeviceSynchronize();
......
......@@ -27,7 +27,8 @@ namespace turbomind {
class Logger {
public:
enum Level {
enum Level
{
TRACE = 0,
DEBUG = 10,
INFO = 20,
......
......@@ -43,7 +43,8 @@ namespace turbomind {
namespace mpi {
// A wrapper of MPI data type. MPI_TYPE_{data_type}
enum MpiType {
enum MpiType
{
MPI_TYPE_BYTE,
MPI_TYPE_CHAR,
MPI_TYPE_INT,
......@@ -53,7 +54,8 @@ enum MpiType {
};
// A wrapper of the level of MPI thread support
enum MpiThreadSupport {
enum MpiThreadSupport
{
THREAD_SINGLE,
THREAD_FUNNELED,
THREAD_SERIALIZED,
......
......@@ -19,7 +19,8 @@
namespace turbomind {
enum class PromptLearningType {
enum class PromptLearningType
{
no_prompt,
soft_prompt,
prefix_prompt,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment