-
Notifications
You must be signed in to change notification settings - Fork 298
Merge q,kv #1199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge q,kv #1199
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from .mm_weight import ( | ||
| MMWeightTpl, | ||
| ) | ||
| from .rowmm_weight import ROWMMWeight, KVROWNMMWeight, ROWBMMWeight | ||
| from .rowmm_weight import ROWMMWeight, KVROWNMMWeight, ROWBMMWeight, QKVROWNMMWeight | ||
| from .colmm_weight import COLMMWeight |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| { | ||
| "1024": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 64, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "128": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 16, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "2048": { | ||
| "BLOCK_SIZE_K": 32, | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 16, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "256": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "512": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 4, | ||
| "num_warps": 4 | ||
| }, | ||
| "64": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "8": { | ||
| "BLOCK_SIZE_K": 32, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "800": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "8192": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| { | ||
| "1": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 4, | ||
| "num_warps": 4 | ||
| }, | ||
| "100": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "1024": { | ||
| "BLOCK_SIZE_K": 32, | ||
| "BLOCK_SIZE_M": 64, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 64, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "128": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 8 | ||
| }, | ||
| "16": { | ||
| "BLOCK_SIZE_K": 64, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 1, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "256": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 32, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 16, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "32": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 64, | ||
| "GROUP_SIZE_M": 16, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 4 | ||
| }, | ||
| "64": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "8": { | ||
| "BLOCK_SIZE_K": 128, | ||
| "BLOCK_SIZE_M": 16, | ||
| "BLOCK_SIZE_N": 128, | ||
| "GROUP_SIZE_M": 32, | ||
| "NEED_TRANS": false, | ||
| "num_stages": 3, | ||
| "num_warps": 8 | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The keys in this JSON configuration file are not sorted, which makes it difficult to read and maintain. For better readability, it's recommended to sort the keys numerically. This is especially helpful when manually inspecting or debugging the autotuning configurations. {
"1": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 64,
"GROUP_SIZE_M": 1,
"NEED_TRANS": false,
"num_stages": 4,
"num_warps": 4
},
"8": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 32,
"NEED_TRANS": false,
"num_stages": 3,
"num_warps": 8
},
"16": {
"BLOCK_SIZE_K": 64,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 1,
"NEED_TRANS": false,
"num_stages": 3,
"num_warps": 4
},
"32": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 64,
"GROUP_SIZE_M": 16,
"NEED_TRANS": false,
"num_stages": 3,
"num_warps": 4
},
"64": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 32,
"NEED_TRANS": false,
"num_stages": 2,
"num_warps": 4
},
"100": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 1,
"NEED_TRANS": false,
"num_stages": 3,
"num_warps": 4
},
"128": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 16,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 32,
"NEED_TRANS": false,
"num_stages": 2,
"num_warps": 8
},
"256": {
"BLOCK_SIZE_K": 128,
"BLOCK_SIZE_M": 32,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 16,
"NEED_TRANS": false,
"num_stages": 2,
"num_warps": 4
},
"1024": {
"BLOCK_SIZE_K": 32,
"BLOCK_SIZE_M": 64,
"BLOCK_SIZE_N": 128,
"GROUP_SIZE_M": 64,
"NEED_TRANS": false,
"num_stages": 3,
"num_warps": 4
}
} |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "1": { | ||
| "BLOCK_SIZE": 256, | ||
| "num_warps": 4 | ||
| }, | ||
| "100": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| }, | ||
| "1024": { | ||
| "BLOCK_SIZE": 256, | ||
| "num_warps": 4 | ||
| }, | ||
| "128": { | ||
| "BLOCK_SIZE": 256, | ||
| "num_warps": 8 | ||
| }, | ||
| "16": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| }, | ||
| "256": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| }, | ||
| "32": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| }, | ||
| "64": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| }, | ||
| "8": { | ||
| "BLOCK_SIZE": 128, | ||
| "num_warps": 8 | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "1": { | ||
| "BLOCK_DIM": 256, | ||
| "BLOCK_M": 2, | ||
| "NUM_STAGE": 2, | ||
| "num_warps": 8 | ||
| }, | ||
| "100": { | ||
| "BLOCK_DIM": 1024, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 1, | ||
| "num_warps": 8 | ||
| }, | ||
| "1024": { | ||
| "BLOCK_DIM": 1024, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 4, | ||
| "num_warps": 1 | ||
| }, | ||
| "128": { | ||
| "BLOCK_DIM": 1024, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 1, | ||
| "num_warps": 16 | ||
| }, | ||
| "16": { | ||
| "BLOCK_DIM": 128, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 1, | ||
| "num_warps": 2 | ||
| }, | ||
| "256": { | ||
| "BLOCK_DIM": 1024, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 4, | ||
| "num_warps": 2 | ||
| }, | ||
| "32": { | ||
| "BLOCK_DIM": 128, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 4, | ||
| "num_warps": 4 | ||
| }, | ||
| "64": { | ||
| "BLOCK_DIM": 128, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 4, | ||
| "num_warps": 4 | ||
| }, | ||
| "8": { | ||
| "BLOCK_DIM": 1024, | ||
| "BLOCK_M": 1, | ||
| "NUM_STAGE": 1, | ||
| "num_warps": 16 | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The keys in this JSON configuration file are not sorted, which makes it difficult to read and maintain. For better readability, it's recommended to sort the keys numerically. This is especially helpful when manually inspecting or debugging the autotuning configurations. {
"1": {
"BLOCK_DIM": 256,
"BLOCK_M": 2,
"NUM_STAGE": 2,
"num_warps": 8
},
"8": {
"BLOCK_DIM": 1024,
"BLOCK_M": 1,
"NUM_STAGE": 1,
"num_warps": 16
},
"16": {
"BLOCK_DIM": 128,
"BLOCK_M": 1,
"NUM_STAGE": 1,
"num_warps": 2
},
"32": {
"BLOCK_DIM": 128,
"BLOCK_M": 1,
"NUM_STAGE": 4,
"num_warps": 4
},
"64": {
"BLOCK_DIM": 128,
"BLOCK_M": 1,
"NUM_STAGE": 4,
"num_warps": 4
},
"100": {
"BLOCK_DIM": 1024,
"BLOCK_M": 1,
"NUM_STAGE": 1,
"num_warps": 8
},
"128": {
"BLOCK_DIM": 1024,
"BLOCK_M": 1,
"NUM_STAGE": 1,
"num_warps": 16
},
"256": {
"BLOCK_DIM": 1024,
"BLOCK_M": 1,
"NUM_STAGE": 4,
"num_warps": 2
},
"1024": {
"BLOCK_DIM": 1024,
"BLOCK_M": 1,
"NUM_STAGE": 4,
"num_warps": 1
}
} |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "1024": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "128": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 1, | ||
| "num_warps": 8 | ||
| }, | ||
| "2048": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 1, | ||
| "num_warps": 1 | ||
| }, | ||
| "256": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 1, | ||
| "num_warps": 8 | ||
| }, | ||
| "512": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 128, | ||
| "NUM_STAGES": 2, | ||
| "num_warps": 4 | ||
| }, | ||
| "64": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 64, | ||
| "NUM_STAGES": 4, | ||
| "num_warps": 1 | ||
| }, | ||
| "8": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 64, | ||
| "NUM_STAGES": 4, | ||
| "num_warps": 1 | ||
| }, | ||
| "800": { | ||
| "BLOCK_M": 1, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 2, | ||
| "num_warps": 1 | ||
| }, | ||
| "8192": { | ||
| "BLOCK_M": 8, | ||
| "BLOCK_N": 256, | ||
| "NUM_STAGES": 4, | ||
| "num_warps": 1 | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The keys in this JSON configuration file are not sorted, which makes it difficult to read and maintain. For better readability, it's recommended to sort the keys numerically. This is especially helpful when manually inspecting or debugging the autotuning configurations. {
"8": {
"BLOCK_M": 1,
"BLOCK_N": 64,
"NUM_STAGES": 4,
"num_warps": 1
},
"64": {
"BLOCK_M": 1,
"BLOCK_N": 64,
"NUM_STAGES": 4,
"num_warps": 1
},
"128": {
"BLOCK_M": 1,
"BLOCK_N": 256,
"NUM_STAGES": 1,
"num_warps": 8
},
"256": {
"BLOCK_M": 1,
"BLOCK_N": 256,
"NUM_STAGES": 1,
"num_warps": 8
},
"512": {
"BLOCK_M": 1,
"BLOCK_N": 128,
"NUM_STAGES": 2,
"num_warps": 4
},
"800": {
"BLOCK_M": 1,
"BLOCK_N": 256,
"NUM_STAGES": 2,
"num_warps": 1
},
"1024": {
"BLOCK_M": 1,
"BLOCK_N": 256,
"NUM_STAGES": 2,
"num_warps": 4
},
"2048": {
"BLOCK_M": 1,
"BLOCK_N": 256,
"NUM_STAGES": 1,
"num_warps": 1
},
"8192": {
"BLOCK_M": 8,
"BLOCK_N": 256,
"NUM_STAGES": 4,
"num_warps": 1
}
} |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The keys in this JSON configuration file are not sorted, which makes it difficult to read and maintain. For better readability, it's recommended to sort the keys numerically. This is especially helpful when manually inspecting or debugging the autotuning configurations.
{ "8": { "BLOCK_SIZE_K": 32, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 64, "GROUP_SIZE_M": 1, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 }, "64": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 1, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 }, "128": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 16, "NEED_TRANS": false, "num_stages": 3, "num_warps": 4 }, "256": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 1, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 }, "512": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 1, "NEED_TRANS": false, "num_stages": 4, "num_warps": 4 }, "800": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 32, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 }, "1024": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 16, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 64, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 }, "2048": { "BLOCK_SIZE_K": 32, "BLOCK_SIZE_M": 32, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 16, "NEED_TRANS": false, "num_stages": 3, "num_warps": 4 }, "8192": { "BLOCK_SIZE_K": 64, "BLOCK_SIZE_M": 64, "BLOCK_SIZE_N": 128, "GROUP_SIZE_M": 32, "NEED_TRANS": false, "num_stages": 2, "num_warps": 4 } }