Repository navigation
[2026-Fall T2-2-2] feat(cv): add vision operators, ResNet-18 & MobileNetV2 CIFAR-10 training - #278
Draft
yanchaomei wants to merge 2 commits into
Draft
yanchaomei wants to merge 2 commits into
yanchaomei wants to merge 2 commits into
Conversation
Author
|
Verified all 3 official CI workflows on fork (
|
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.
Summary
Implements Track 2 Problem 2 (InfiniTrain Small Vision Model Training Support) for the 2026 Autumn InfiniTensor AI Contest (Team: 启忆智存, GitHub:
@yanchaomei).Framework & Operator Additions (CPU + CUDA, Forward + Backward, FP32)
stride,padding,bias,groupsincluding depthwisegroups == in_channels):USE_CUDNN=OFF): specialized depthwise kernel, zero-im2col 1x1 strided-batched GEMM, chunked batched im2col + cuBLAS SGEMM, deterministic gather col2im, 32-bit indexing, per-thread/per-device reusable workspace.USE_CUDNN=ON,-DCUDNN_ROOT=...): strict FP32 (CUDNN_FMA_MATH), cached descriptors/plans, deterministic algorithm selection by default.running_varupdate, FP64 statistics accumulation on CPU & CUDA).Module::Train(bool)/Eval()/is_training(), buffer accessors,nn::init::KaimingNormal,optimizers::SGDwith PyTorch-exactmomentum&weight_decay+ fusedSGDAccumulateGradkernel +StateDict()/LoadStateDict()(preserving empty state whenmomentum == 0), andsave_planner.ccsupport for SGD optimizer keys.CMakeLists.txtrespects external-DCMAKE_CUDA_ARCHITECTURES(includingsm_86/sm_120) and adds optionalUSE_CUDNN+cifar10executable.CIFAR-10 End-to-End Suite (
example/cifar10/)ResNet18(CIFAR 3x3 stride-1 stem) &MobileNetV2(width_mult=1.0, CIFAR strides), matching PyTorch state_dict keys 1:1.example/cifar10/verify_pytorch_alignment.pyand weight exporterexample/cifar10/export_alignment_weights.py.example/cifar10/HONOR_CODE.mdandexample/cifar10/REFERENCE.md.Verified Results (NVIDIA A40 46GB, FP32, TF32=OFF)
3.78e-3, MobileNetV25.92e-3<=1e-2); Checkpoint resume 0-bit identical; 2-GPU DDP gradient allreduce max diff0.00e+00.USE_CUDNN=OFF: ResNet-18 1,828 img/s (50.1%), MobileNetV2 2,130 img/s (62.7%); 2-GPU DDP 1.90x / 1.95x.USE_CUDNN=ON(det.): ResNet-18 2,817 img/s (77.1%), MobileNetV2 2,166 img/s (63.8%); 2-GPU DDP 1.93x / 1.89x (5,378 / 4,095 img/s).ctest316/316 PASS; CUDA suite 25/25 PASS (includingAutogradCVTest6/6,test_checkpoint_cuda36/36,test_optimizer_cuda26/26); repo-wideclang-format-16&blackPASS.(Draft PR submitted ahead of midterm to validate official CI; final RTX 5090
sm_120verification numbers will be appended once compute vouchers are redeemed.)