Skip to content
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
51da6b7
modify cmake for warpctc and warprnnt
jxwangmetax Sep 16, 2025
b60cba2
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 16, 2025
1abea54
modify conv for tf32 and fp32
jxwangmetax Sep 16, 2025
fc63171
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 16, 2025
f26987f
modify conv kernel
jxwangmetax Sep 16, 2025
a0cb0a7
modify library to static library
jxwangmetax Sep 16, 2025
d6579b8
Merge branch 'develop' into develop
jxwangmetax Sep 16, 2025
9a9372b
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 16, 2025
9cd1f2e
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 16, 2025
fb902f4
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 17, 2025
7b018df
modify kernel
jxwangmetax Sep 17, 2025
e61cf0d
modify fused_bias_dropout_residual_layer_norm
jxwangmetax Sep 17, 2025
0e5be1a
Merge branch 'develop' into develop
jxwangmetax Sep 17, 2025
2757fb7
modify compile
jxwangmetax Sep 18, 2025
74a263a
Merge branch 'develop' of https://github.com/jxwangmetax/PaddleCustom…
jxwangmetax Sep 18, 2025
88d5eae
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 19, 2025
b2b41c2
modify blas
jxwangmetax Sep 19, 2025
6ea2fab
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 22, 2025
6556cce
modify blas
jxwangmetax Sep 22, 2025
1cbe0d8
modify blas
jxwangmetax Sep 22, 2025
554b3cb
modify blas
jxwangmetax Sep 22, 2025
dfac884
modify context
jxwangmetax Sep 22, 2025
5845b41
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 22, 2025
93f75b7
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 24, 2025
e7278d0
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 26, 2025
36aab9d
modify kernels
jxwangmetax Sep 26, 2025
01586f9
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 28, 2025
3531ed0
modify kernels
jxwangmetax Sep 29, 2025
f0562bb
Merge branch 'develop' into develop
jxwangmetax Sep 29, 2025
f9ab930
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 29, 2025
5ccb3ae
modify kernels
jxwangmetax Sep 29, 2025
21b4d24
Merge branch 'metax666:develop' into develop
jxwangmetax Sep 30, 2025
a974b6d
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 9, 2025
e03a321
add print tensor
jxwangmetax Oct 11, 2025
c3310ab
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 13, 2025
bb8e254
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 14, 2025
f93a746
modify kernels
jxwangmetax Oct 20, 2025
d10d482
Merge branch 'develop' of https://github.com/jxwangmetax/PaddleCustom…
jxwangmetax Oct 20, 2025
ecad822
modify kernels
jxwangmetax Oct 20, 2025
f84781b
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 20, 2025
7b63aee
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 21, 2025
9d1ae2a
Merge branch 'metax666:develop' into develop
jxwangmetax Oct 21, 2025
da1b542
modify kernels
jxwangmetax Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 157 additions & 1 deletion backends/metax_gpu/patch/paddle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,163 @@ index 024a7de73e..66b373d698 100644
} \
} while (0)
#elif defined(__HIPCC__)

diff --git a/paddle/phi/kernels/funcs/blas/blas_impl.cu.h b/paddle/phi/kernels/funcs/blas/blas_impl.cu.h
index ae7b67de6d..fbe9f67737 100644
--- a/paddle/phi/kernels/funcs/blas/blas_impl.cu.h
+++ b/paddle/phi/kernels/funcs/blas/blas_impl.cu.h
@@ -368,7 +368,7 @@ struct CUBlas<phi::float16> {
cudaDataType_t Ctype,
int ldc,
int batchCount,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 8000
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
#if CUDA_VERSION >= 9000
@@ -476,7 +476,7 @@ struct CUBlas<phi::float16> {
void *C,
cudaDataType_t Ctype,
int ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 8000
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
#if CUDA_VERSION >= 9000
@@ -532,7 +532,7 @@ struct CUBlas<phi::float16> {
void *C,
cudaDataType_t Ctype,
int64_t ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 12030 && defined(__linux__)
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
bool use_tensor_op_math = dev_ctx->tensor_core_available();
@@ -759,7 +759,7 @@ struct CUBlas<phi::complex64> {
void *C,
cudaDataType_t Ctype,
int ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 8000
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
#if CUDA_VERSION >= 9000
@@ -815,7 +815,7 @@ struct CUBlas<phi::complex64> {
void *C,
cudaDataType_t Ctype,
int64_t ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 12030 && defined(__linux__)
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
bool use_tensor_op_math = dev_ctx->tensor_core_available();
@@ -1154,7 +1154,7 @@ struct CUBlas<phi::complex128> {
void *C,
cudaDataType_t Ctype,
int ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 8000
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
#if CUDA_VERSION >= 9000
@@ -1210,7 +1210,7 @@ struct CUBlas<phi::complex128> {
void *C,
cudaDataType_t Ctype,
int64_t ldc,
- cudaDataType_t computeType) {
+ cublasComputeType_t computeType) {
#if CUDA_VERSION >= 12030 && defined(__linux__)
cublasGemmAlgo_t algo = CUBLAS_GEMM_DFALT;
bool use_tensor_op_math = dev_ctx->tensor_core_available();
@@ -1484,7 +1484,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16F,
N,
- CUDA_R_32F);
+ CUBLAS_COMPUTE_32F);
#else
PADDLE_THROW(common::errors::Unimplemented(
"GEMM_EX_64 is not supported on cuda < 12.3"));
@@ -1508,7 +1508,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16F,
static_cast<int>(N),
- CUDA_R_32F);
+ CUBLAS_COMPUTE_32F);
}
#else
// CUDA 7.5 does not support cublasGemmEx, hence we fall back to use hgemm
@@ -1694,7 +1694,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16F,
N,
- CUDA_R_32F);
+ CUBLAS_COMPUTE_32F);
#else
PADDLE_THROW(common::errors::Unimplemented(
"GEMM_EX_64 is not supported on cuda < 12.3"));
@@ -1719,7 +1719,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16F,
static_cast<int>(N),
- CUDA_R_32F);
+ CUBLAS_COMPUTE_32F);
#else
// CUDA 7.5 does not support cublasGemmEx, hence we fall back to use hgemm
dev_ctx_.CublasCall([&](cublasHandle_t handle) {
@@ -1831,7 +1831,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16BF,
static_cast<int>(N),
- CUDA_R_32F,
+ CUBLAS_COMPUTE_32F,
algo));
});
}
@@ -1932,7 +1932,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_R_16BF,
static_cast<int>(N),
- CUDA_R_32F,
+ CUBLAS_COMPUTE_32F,
algo));
});
}
@@ -2026,7 +2026,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_C_32F,
static_cast<int>(N),
- CUDA_C_32F);
+ CUBLAS_COMPUTE_32F);

#else
dev_ctx_.CublasCall([&](cublasHandle_t handle) {
@@ -2111,7 +2111,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_C_64F,
N,
- CUDA_C_64F);
+ CUBLAS_COMPUTE_64F);
#else
PADDLE_THROW(common::errors::Unimplemented(
"GEMM_EX_64 is not supported on cuda < 12.3"));
@@ -2136,7 +2136,7 @@ inline void Blas<phi::GPUContext>::GEMM(CBLAS_TRANSPOSE transA,
C,
CUDA_C_64F,
static_cast<int>(N),
- CUDA_C_64F);
+ CUBLAS_COMPUTE_64F);
#else // CUDA_VERSION >= 8000
// CUDA 7.5 does not support cublasGemmEx, hence we fall back to use hgemm
dev_ctx_.CublasCall([&](cublasHandle_t handle) {
@@ -3129,7 +3129,7 @@ inline void Blas<phi::GPUContext>::BatchedGEMM(CBLAS_TRANSPOSE transA,
CUDA_R_16F,
ldc,
batchCount,
- CUDA_R_32F);
+ CUBLAS_COMPUTE_32F);
}

template <>
diff --git a/paddle/phi/kernels/funcs/blas/blaslt_gemm_search.h b/paddle/phi/kernels/funcs/blas/blaslt_gemm_search.h
index e63b3d2f6e..95d7e6f204 100644
--- a/paddle/phi/kernels/funcs/blas/blaslt_gemm_search.h
Expand Down
Loading