GithubHelp home page GithubHelp logo

sunnycee99 / modelsplit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edgescheduler/modelsplit

0.0 0.0 0.0 116.62 MB

Try to Split one model to many smaller models

License: Apache License 2.0

Shell 0.06% Python 99.94%

modelsplit's Introduction

ModelSplit

Try to Split one model to many smaller models

Time Test

shape=(1,3,224,224)

  • dell04
    • cpu:
      • 0.1935865879058838
      • 0.17652320861816406
    • gpu
      • 0.4194180965423584
      • 0.005059957504272461
  • P1000
    • 0.030528545379638672
    • 0.0256803035736084
dell04-gpu(2080Ti) dell04-cpu P1000 开发板A9
冷启动:第一次运行 0.4194180965423584 0.1935865879058838 0.030528545379638672 4.442520
第二次+ 0.005059957504272461 0.17652320861816406 0.0256803035736084 2.276656

Support

only support to parse & split IRModule text without meta[Constant] value

  • DL model
    • googlenet
    • resnet50
    • squeezenet
    • vgg19
    • yolov2
  • convergence node
    • 2 limits
      • a node has only one next node, and the next node only has one prior node, too.
      • there is no data flow across from priors to next
        • priors: the total of in degree(include convergence)==the total of out degree((exclude convergence))
  • split model steps
    • init: get a IRModule text file, with a value shape
    • parse IRModule text, build graph with the relationship of operators, find convergence node points
    • choose one or more convergence node points as the split points of the model
    • split the IRModule text as two or more parts, store as some split-IRModule text and a params json file
      • split-IRModule text need to handle input(add new input & remove (include redundant input/params)
      • params json file record the input & ouput of each split IRModule
    • export python file with split-IRModule text
      • the python file consists of a function that return RelayExpr, so you can just import this function
      • use tvm.IRModule.from_expr to translate RelayExpr to IRModule

modelsplit's People

Contributors

oneflyingfish avatar wanna959 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.