Skip to content

【训练营】小模型训练支持 - #219

Open
lewis56654281 wants to merge 2 commits into
InfiniTensor:masterfrom
lewis56654281:ztc/mnist-cnn-support
Open

lewis56654281 wants to merge 2 commits into
InfiniTensor:masterfrom
lewis56654281:ztc/mnist-cnn-support

Conversation

@lewis56654281

Copy link
Copy Markdown

为 MNIST 示例增加两层 CNN,支持 CPU、CUDA 和双卡 DDP 训练,补齐 Conv2d、ReLU 及相关测试

@kilinchange

Copy link
Copy Markdown
Collaborator

请解决 pr 冲突。

@kilinchange
kilinchange self-requested a review September 23, 2026 08:35
@lewis56654281
lewis56654281 force-pushed the ztc/mnist-cnn-support branch from 871479d to 50d276a Compare October 9, 2026 07:29
@lewis56654281

Copy link
Copy Markdown
Author

已基于最新 master 完成 rebase 并解决冲突,更新至 50d276a。麻烦有空时继续 review,谢谢!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

矩阵乘计算建议复用 infini_train/src/kernels/common/gemm.h 里提供的现有实现。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已复用common/gemm.h 里的实现

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件不需要改动

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改动已经撤回

Comment thread infini_train/src/kernels/cuda/relu.cu Outdated

@kilinchange kilinchange Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relu 建议复用已有 elementwise 基建,参照其他 kernel 的写法,在 elemetwise.cu 中新增 relu 实现;cpu kernel 同理。

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已经把 ReLU 移到 elementwise.cu,用里面现有的函数来计算了。原来的 relu.cu 已删除

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants