Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions backends/metax_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ target_compile_definitions(
${TARGET_NAME}
PUBLIC PADDLE_WITH_CUDA=1
PADDLE_WITH_CUSTOM_DEVICE=1
mcblasContext=cublasContext
GPUContext=CustomContext
KPSContext=CustomContext
STREAM_TYPE=cudaStream_t
Expand Down
12 changes: 0 additions & 12 deletions backends/metax_gpu/kernels/metax_kernel/metax_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,4 @@ void DnnWorkspaceHandle::ReallocWorkspace(size_t required_workspace_bytes) {
allocation_.reset();
allocation_ = allocator_->Allocate(required_workspace_bytes);
}

static std::function<blasLtHandle_t()> blaslt_handle_creator_{nullptr};
static blasLtHandle_t blaslt_handle_{nullptr};
static std::once_flag flag_blaslt_;

static void InitBlasLtHandle(blasLtHandle_t* blaslt_handle) {
#if defined(PADDLE_WITH_CUDA) && CUDA_VERSION >= 11060
mcblasLtCreate(blaslt_handle);
#elif defined(PADDLE_WITH_HIP)
phi::dynload::hipblasLtCreate(blaslt_handle);
#endif
}
} // namespace phi
4 changes: 1 addition & 3 deletions backends/metax_gpu/kernels/metax_kernel/metax_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
#include "paddle/phi/core/attribute.h"
#include "paddle/phi/core/device_context.h"

using blasLtHandle_t = struct mcblasLtContext*;

blasLtHandle_t GetBlasLtHandle();
cublasLtHandle_t GetBlasLtHandle();

namespace phi {
class DnnWorkspaceHandle {
Expand Down
1 change: 0 additions & 1 deletion backends/metax_gpu/patch/paddle.patch
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ index 4eae698648..5c047723ea 100644
#endif
return block_dim >= kMaxBlockDim ? kMaxBlockDim : lwarpSize;
}

diff --git a/paddle/phi/kernels/funcs/math/context_project.h b/paddle/phi/kernels/funcs/math/context_project.h
index 15e1a4a3c3..e4780538d7 100644
--- a/paddle/phi/kernels/funcs/math/context_project.h
Expand Down
Loading