完成 TinyInfiniTrain 作业:autograd、算子(CPU/CUDA)、Tensor、Dispatcher 与 GPT-2 端到端训练 - #10
Open
accelerator-llc wants to merge 12 commits into
Open
完成 TinyInfiniTrain 作业:autograd、算子(CPU/CUDA)、Tensor、Dispatcher 与 GPT-2 端到端训练#10accelerator-llc wants to merge 12 commits into
accelerator-llc wants to merge 12 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
完成全部 6 个作业:Dispatcher 注册机制、Neg autograd 算子、Matmul(CPU/CUDA)、Adam 优化器(CPU/CUDA)、Tensor Flatten/Backward、GPT-2 端到端数据读取与文本生成。所有实现均在作业标记区域内,老师注释一字未动。
作业报告
测试结果
make test-cpp)USE_CUDA=OFFCPU 构建)device_flag="cuda",CPU 构建下必然无法运行关于 test_gpt2 的环境敏感性(重要说明)
LogitsConsistency对比 11 步训练后的 logits 与参考文件(100 抽样点,1e-3 容差)。经系统性排查确认:在 RTX 5090 + CUDA 13.3 运行时环境下全量 8/8 通过(含 test_gpt2);4060(Ada 架构)或 CUDA 12.8 环境下 test_gpt2 因上述环境性差异失败,其余测试全过。该问题与作业实现质量无关,建议课程方在验收时说明参考文件的生成环境,或对 test_gpt2 的容差/验证方式做环境适配。
复现
该测试通过依赖参考文件的生成环境(CUDA 13.3 工具链 + Blackwell GPU,见上文环境敏感性说明)。完整复现步骤:
make(若验收机无 13.3 工具链,可在具备 13.3 的机器构建后,将二进制与 13.3 运行时库(libcudart/libcublas 13.x)一并部署到验收机)。