Unoptimized Build
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- cmake, cpp
- 领域
- build-system
调研方向
Start from the CUDA target definition under ggml/src/ggml-cuda and the generated template-instances/*.cu files shown in the build log, especially the fattn-mma-kvarn-* objects. Reproduce with a clean CUDA build and time those objects to confirm where the slowdown is. Done means the build is faster without changing kernel behavior and the CUDA build/tests still pass.
由索引模型根据 Issue 内容生成。
描述
Hey there, thanks for this project!
I have been trying it out, and it's quite clear that the build is highly unoptimized. Trying it on two different, beefy machines, shows the build significantly slowing down around here:
[ 14%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_1-ncols2_8.cu.o
[ 14%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_16-ncols2_1.cu.o
[ 14%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_16-ncols2_2.cu.o
[ 14%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_16-ncols2_4.cu.o
[ 14%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_16-ncols2_8.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_2-ncols2_4.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_2-ncols2_8.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_32-ncols2_1.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_32-ncols2_2.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_4-ncols2_2.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_4-ncols2_4.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_4-ncols2_8.cu.o
[ 15%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_64-ncols2_1.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_8-ncols2_1.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_8-ncols2_2.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_8-ncols2_4.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-instance-ncols1_8-ncols2_8.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k8-v8.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k8-v6.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k8-v5.cu.o
[ 16%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k6-v6.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k6-v5.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k6-v4.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k5-v5.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k5-v4.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k5-v3.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k4-v4.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k4-v3.cu.o
[ 17%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k4-v2.cu.o
[ 18%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k3-v3.cu.o
[ 18%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k3-v2.cu.o
[ 18%] Building CUDA object ggml/src/ggml-cuda/CMakeFiles/ggml-cuda.dir/template-instances/fattn-mma-kvarn-decode-instance-k2-v2.cu.o
Notice that it is the kvarn object files that are the significant slowdown. Would you be willing to implement a build optimization fix? I'm guessing these are pulling in a significant amount of headers. It's quite unbelievable how slow the build is for these object files, each taking in the order of tens of minutes.
- 主要语言
- C++
- 星标
- 1.2k
- 派生
- 80
- 平均合并
- 4 天 20 小时
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Anbeeld/beellama.cpp 的其他 Issue
-
[BUG] KVarN assertion failure in build_inp_mem_hybrid_iswa() due to uninitialized self_kvarn_rot未关闭
难度 2/5 1-3 小时 新手友好度 68/100
Anbeeld/beellama.cpp#205 ·
-
难度 3/5 半天 新手友好度 58/100
Anbeeld/beellama.cpp#206 ·
-
难度 3/5 1-2 天 新手友好度 57/100
Anbeeld/beellama.cpp#204 ·
-
难度 4/5 3-5 天 新手友好度 45/100
Anbeeld/beellama.cpp#203 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
Anbeeld/beellama.cpp#202 · 1 条评论 ·
查看 Anbeeld/beellama.cpp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
CachyOS/packageinstaller#144 ·
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 82/100
TomerAberbach/profiler-md#951 ·
维护者通常 1 天内回复
-
[Bug] Default key routing (JavaStringHash) picks a different partition than the Java client for about half of keys可能已有人在做 @0z5a 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
apache/pulsar-client-go#1575 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
pocoproject/poco#5764 ·
维护者通常 2 天内回复
-
bug cpp-core-guidelines low-priority
难度 2/5 1-3 小时 新手友好度 62/100
NatronGitHub/openfx-supportext#164 ·
维护者通常 1 天内回复