Memory allocation

未关闭
#4,665 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
c

调研方向

首先阅读 blas_thread_init、adjust_thread_buffers、blas_thread_server,以及 blas_memory_alloc(0) 附近的 gemm 路径。将分配行为与 PR #4577 中描述的修改前逻辑进行比较。当不再分配额外的主线程缓冲区,并且线程缓冲区的行为仍然正确时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

PR #4577

We have introduced adjust_thread_buffers() function, similar to OpenMP, for initializing global thread buffers instead of the existing local buffers initialized in blas_thread_server.

In blas_thread_init, memory is allocated for blas_cpu_number threads using the adjust_thread_buffers interface. However, when calling interfaces like gemm, memory allocation is still performed in the main thread:

buffer = (XFLOAT *)blas_memory_alloc(0);

This would lead to an additional buffer being allocated, deviating from the logic of the code before the modification.

主要语言
C
星标
7.6k
派生
1.7k
平均合并
1 天 3 小时
30 天内合并 PR
42

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

OpenMathLib/OpenBLAS 的其他 Issue

查看 OpenMathLib/OpenBLAS 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。