Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
enlarge stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyu-intel committed May 23, 2024
1 parent 4965b41 commit 4683b39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bestla/bestla/bestla_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,12 @@ class LauncherBase {
template <typename ScaleT, int MTILE, class SNbits>
static void gemv_kblock(const Param& _param, const parallel::gemm::ThreadProblemBase& _config) {
if constexpr (support()) {
auto constexpr TmpSize = 3 * 1024LL;
auto constexpr CSize = 1 * 1024LL;
auto constexpr TmpSize = 16 * 1024LL;
auto constexpr CSize = 8 * 1024LL;
auto StackTmp_ = alloca(TmpSize + CSize);
auto StackTmp = utils::cpu_pointer_align<void>(StackTmp_);
auto tmpc_ptr = reinterpret_cast<CType*>((char*)StackTmp + TmpSize);
static_assert(CSize >= (MTILE * GemmCore::NTILE * sizeof(float)));
utils::GemvParamB<ScaleT> paramB = SNbits::template createB<ScaleT>(_param.paramB.packedW);
const float* Aptr = _param.paramA.A;
if constexpr (std::is_same_v<PrologueA,
Expand Down Expand Up @@ -689,8 +690,9 @@ class LauncherIntKBlock {
template <typename ScaleT, int MTILE, class SNbits>
static void gemv_kblock(const Param& _param, const parallel::gemm::ThreadProblemBase& _config) {
if constexpr (support()) {
auto constexpr TmpSize = 3 * 1024LL;
auto constexpr CSize = 1 * 1024LL;
auto constexpr TmpSize = 16 * 1024LL;
auto constexpr CSize = 8 * 1024LL;
static_assert(CSize >= (MTILE * GemmCore::NTILE * sizeof(float)));
auto StackTmp_ = alloca(TmpSize + CSize);
auto StackTmp = utils::cpu_pointer_align<void>(StackTmp_);
auto tmpc_ptr = reinterpret_cast<CType*>((char*)StackTmp + TmpSize);
Expand Down

0 comments on commit 4683b39

Please sign in to comment.