Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhangzz committed Nov 2, 2023
1 parent 8936413 commit bd6b89c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ namespace mmha {
////////////////////////////////////////////////////////////////////////////////////////////////////

template<typename T, int Dh>
struct Qk_vec_m_ {};
struct Qk_vec_m_ {
};

template<>
struct Qk_vec_m_<float, 32> {
Expand Down Expand Up @@ -179,7 +180,8 @@ struct Qk_vec_k_<__nv_fp8_e4m3, 256> {
////////////////////////////////////////////////////////////////////////////////////////////////////

template<typename T, int THREADS_PER_KEY>
struct K_vec_m_ {};
struct K_vec_m_ {
};

template<>
struct K_vec_m_<float, 4> {
Expand Down Expand Up @@ -260,7 +262,8 @@ struct K_vec_k_<__nv_fp8_e4m3, 1> {
////////////////////////////////////////////////////////////////////////////////////////////////////

template<typename T, int V_VEC_SIZE>
struct V_vec_m_ {};
struct V_vec_m_ {
};

template<>
struct V_vec_m_<float, 1> {
Expand Down Expand Up @@ -340,7 +343,8 @@ struct V_vec_k_<__nv_fp8_e4m3, 16> {

#ifdef MMHA_USE_FP32_ACUM_FOR_FMA
template<typename T>
struct Qk_vec_acum_fp32_ {};
struct Qk_vec_acum_fp32_ {
};

template<>
struct Qk_vec_acum_fp32_<float> {
Expand Down Expand Up @@ -422,7 +426,8 @@ struct Qk_vec_acum_fp32_<fp8_4_t> {
////////////////////////////////////////////////////////////////////////////////////////////////////

template<typename T>
struct K_vec_acum_fp32_ {};
struct K_vec_acum_fp32_ {
};

template<>
struct K_vec_acum_fp32_<float> {
Expand Down Expand Up @@ -484,7 +489,8 @@ struct K_vec_acum_fp32_<fp8_4_t> {

#ifdef MMHA_USE_FP32_ACUM_FOR_OUT
template<typename T>
struct V_vec_acum_fp32_ {};
struct V_vec_acum_fp32_ {
};

template<>
struct V_vec_acum_fp32_<float> {
Expand Down
3 changes: 2 additions & 1 deletion src/turbomind/models/llama/Request.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ struct Request {
using Callback = std::function<void(std::unordered_map<std::string, Tensor>*)>;
Callback stream_cb;

enum {
enum
{
kInvalid = 1,
kConflict = 2,
kBusy = 3,
Expand Down
3 changes: 2 additions & 1 deletion src/turbomind/models/llama/SequenceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace turbomind {

struct Sequence {

enum Status {
enum Status
{
kCached = 0,
kLocked,
kActive
Expand Down
2 changes: 1 addition & 1 deletion src/turbomind/models/llama/llama_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct LlamaAttentionParams {
int max_position_embeddings;
float rope_scaling_factor;
// bool use_dynamic_ntk;
bool use_logn_attn;
bool use_logn_attn;
};

} // namespace turbomind
8 changes: 5 additions & 3 deletions src/turbomind/models/llama/llama_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

namespace turbomind {

enum QuantPolicy {
enum QuantPolicy
{
kNone = 0x00,
// reserve 0x01 and 0x02 for backward compatibility
kReserve1 = 0x01,
Expand All @@ -19,7 +20,8 @@ enum QuantPolicy {
kCacheKVInt8 = 0x04,
};

enum CmpMode {
enum CmpMode
{
kCmpNone,
kCmpRead,
kCmpWrite,
Expand Down Expand Up @@ -51,7 +53,7 @@ inline std::string to_string(std::string x)
template<typename... Args>
std::string Concat(std::string key, Args&&... args)
{
std::vector<std::string> args_str{detail::to_string((Args&&)args)...};
std::vector<std::string> args_str{detail::to_string((Args &&) args)...};
for (const auto& s : args_str) {
key.append("_");
key.append(s);
Expand Down

0 comments on commit bd6b89c

Please sign in to comment.