forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new instances for 405B decoding (pytorch#2936)
Summary: Pull Request resolved: pytorch#2936 Reviewed By: jwfromm Differential Revision: D60670405
- Loading branch information
1 parent
6607072
commit 2ad32dc
Showing
5 changed files
with
97 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...els/fp8_rowwise_128x16x32x512_16x16_1x1_8x16x1_8x16x1_1x16x1x8_4x4x1_1x1_interwave_v2.hip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#include "fp8_rowwise_common.h" | ||
|
||
at::Tensor | ||
fp8_rowwise_128x16x32x512_16x16_1x1_8x16x1_8x16x1_1x16x1x8_4x4x1_1x1_interwave_v2( | ||
at::Tensor XQ, | ||
at::Tensor WQ, | ||
at::Tensor x_scale, | ||
at::Tensor w_scale, | ||
at::Tensor Y) { | ||
// The smallest kernel we have available. Works well for memory bound shapes. | ||
using DeviceGemmInstance = DeviceGemmHelper< | ||
128, | ||
16, | ||
32, | ||
512, | ||
16, | ||
16, | ||
1, | ||
1, | ||
S<8, 16, 1>, | ||
S<8, 16, 1>, | ||
S<1, 16, 1, 8>, | ||
S<4, 4, 1>, | ||
1, | ||
1, | ||
ck::BlockGemmPipelineScheduler::Interwave, | ||
ck::BlockGemmPipelineVersion::v2>; | ||
// Run kernel instance. | ||
return f8f8bf16_rowwise_impl<DeviceGemmInstance>(XQ, WQ, x_scale, w_scale, Y); | ||
} |
38 changes: 38 additions & 0 deletions
38
...ernels/fp8_rowwise_64x16x16x512_16x16_1x1_8x8x1_8x8x1_1x16x1x4_4x4x1_1x1_interwave_v2.hip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#include "fp8_rowwise_common.h" | ||
|
||
at::Tensor | ||
fp8_rowwise_64x16x16x512_16x16_1x1_8x8x1_8x8x1_1x16x1x4_4x4x1_1x1_interwave_v2( | ||
at::Tensor XQ, | ||
at::Tensor WQ, | ||
at::Tensor x_scale, | ||
at::Tensor w_scale, | ||
at::Tensor Y) { | ||
// The smallest kernel we have available. Works well for memory bound shapes. | ||
using DeviceGemmInstance = DeviceGemmHelper< | ||
64, | ||
16, | ||
16, | ||
512, | ||
16, | ||
16, | ||
1, | ||
1, | ||
S<8, 8, 1>, | ||
S<8, 8, 1>, | ||
S<1, 16, 1, 4>, | ||
S<4, 4, 1>, | ||
1, | ||
1, | ||
ck::BlockGemmPipelineScheduler::Interwave, | ||
ck::BlockGemmPipelineVersion::v2>; | ||
// Run kernel instance. | ||
return f8f8bf16_rowwise_impl<DeviceGemmInstance>(XQ, WQ, x_scale, w_scale, Y); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters