-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sdp: fuse ops in sdp_math path * Ensure attn_mask contiguous * Add ut --------- Co-authored-by: Ye Ting <ting.ye@intel.com> Co-authored-by: zhuyuhua-v <yuhua.zhu@intel.com> Co-authored-by: xiaolil1 <xiaoli.liu@intel.com>
- Loading branch information
1 parent
4ba6dec
commit 7ea2a3c
Showing
5 changed files
with
104 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#include "Blas.h" | ||
#include <ATen/WrapDimUtilsMulti.h> | ||
#include <ATen/native/Resize.h> | ||
#include "BlasImpl.h" | ||
|
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,26 @@ | ||
#pragma once | ||
|
||
#include <ATen/ATen.h> | ||
|
||
namespace at { | ||
namespace AtenIpexTypeXPU { | ||
// res = (m1 * m2.transpose()) / oscale | ||
at::Tensor trans_matmul_div_scalar( | ||
const at::Tensor& tensor2, | ||
int64_t dim1, | ||
int64_t dim2, | ||
const at::Tensor& tensor1, | ||
Scalar oscale); | ||
|
||
// res = (m1 * m2.transpose()) / oscale + accumul | ||
at::Tensor trans_matmul_div_add( | ||
const at::Tensor& tensor2, | ||
int64_t dim1, | ||
int64_t dim2, | ||
const at::Tensor& tensor1, | ||
Scalar oscale, | ||
Tensor& accumul, | ||
Scalar alpha); | ||
|
||
} // namespace AtenIpexTypeXPU | ||
} // namespace at |
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
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