GithubHelp home page GithubHelp logo

lixiang007666 / alexnet_parallel_oneflow Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 16 KB

A distributed parallel implementation of AlexNet, including DP, TP and PP.

License: MIT License

Python 100.00%

alexnet_parallel_oneflow's Introduction

alexnet_parallel_oneflow

A distributed parallel implementation of AlexNet, including DP, TP and PP. The dataset uses a small CIFAR10.

Download dataset

training_data = flowvision.datasets.CIFAR10(
    root="data",
    train=True,
    transform=transforms.ToTensor(),
    download=False,
)

If you want to test with a larger dataset, the OFRecord code for the ImageNet dataset is also provided. See: alexnet_1d_ofrecord.

Result

BATCH_SIZE = 128

Training time (s) CUDAMemoryUsed (MB)
1d 96.46 GPU0: 2158.0
dp 109.48 GPU0: 1944.0, GPU1: 1954.0
tp 104.03 GPU0: 1835.0, GPU1: 1843.0
pp 104.26 GPU0: 2020.0, GPU1: 1192.0

NOTE: Among them, the tensor parallel only splits the Linear layer. See the code for details on the tensor parallel.

BATCH_SIZE = 1

Training time (s) CUDAMemoryUsed (MB)
1d 186.33 GPU0: 1544.0
dp 179.42 GPU0: 1674.0, GPU1: 1684.0
tp 138.83 GPU0: 1567.0, GPU1: 1577.0
pp 152.11 GPU0: 1544.0, GPU1: 1188.0

BATCH_SIZE = 1024

Training time (s) CUDAMemoryUsed (MB)
1d 92.58 GPU0: 5162.0
dp 109.48 GPU0: 3588.0, GPU1: 3598.0
tp 91.04 GPU0: 3715.0, GPU1: 3737.0
pp 88.53 GPU0: 5416.0, GPU1: 1228.0

alexnet_parallel_oneflow's People

Contributors

lixiang007666 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.