GithubHelp home page GithubHelp logo

oranger239 / sofa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyliustack/sofa

0.0 0.0 0.0 63.54 MB

Swarm of Functions Analysis Tools

License: Apache License 2.0

Shell 3.14% Python 51.26% HTML 6.10% JavaScript 0.29% C++ 0.20% Dockerfile 0.10% Cuda 0.43% Jupyter Notebook 38.43% CSS 0.04%

sofa's Introduction

Introduction

SOFA: SOFA (Swarm-Oriented Function Call Analysis)

Alt text

Prerequisite

  1. Run ./tools/prepare.sh to install all the necessary packages and python packages.
  2. [OPTIONAL] Run ./tools/empower.py $(whoami) $(which tcpdump) to make network related events tracable in SOFA. After running this step, it is required to re-login to APPLY THE CHANGES!!!

Installation

  1. Simply run ./install.sh </PATH/TO/INSTALL> to install SOFA on your system. Note that sofa will be appended to the path if the last directory is not sofa.
  2. Then, run source </PATH/TO/INSTALL>/sofa/tools/activate.sh to activate SOFA running environment. (Need to be executed on each new shell.)
  3. [ALTERNATIVE] Add source </PATH/TO/INSTALL>/sofa/tools/activate.sh in your ~/.bashrc to make this environment available on every shell.

Usages

SOFA supports serveral different usages, like how one can use perf. More details can be seen in the following slide

Basic Statistics

  1. Profile your program by sampling involved CPUs:
    sofa stat "dd if=/dev/zero of=dummy.out bs=100M count=10"
  2. Profile your program by sampling all CPUs:
    sofa stat "dd if=/dev/zero of=dummy.out bs=100M count=10" --profile_all_cpus

Performance Visualizations

  1. sofa record "dd if=/dev/zero of=dummy.out bs=100M count=10"
  2. sofa report [--verbose] [--with-gui]
  3. If passing "--with-gui" to "sofa report", you could open browser with one of the following links for different visualizations.

Advanced Usages

SOFA provides options for advanced usages. Some examples are shown below. Please use sofa --help to see more info.

  1. sofa record "python tf_cnn_benchmarks.py" --cpu_filters="idle:black,tensorflow:orange"
  2. sofa record "python tf_cnn_benchmarks.py" --gpu_filters="tensorflow:orange"

Examples of Visualization Results:

sofa record "python3.6 pytorch_dnn_example.py -a resnet50 /mnt/dataset/imagenet/mini-imagenet/raw-data --epochs=1 --batch-size=64"
Alt text

sofa record "./scout dt-bench ps:resnet50 --hosts='192.168.0.100,192.168.0.101'"
Alt text

sofa record "~/cuda_samples/1_Utilities/bandwidthTest/bandwidthTest"
Alt text

sofa record "./scout t-bench resnet50_real"
Alt text

sofa's People

Contributors

cyliustack avatar oranger239 avatar softdi avatar s9013xx avatar wei-yuan avatar liujames avatar sjeemb avatar medicineyeh avatar pjw91 avatar notreal1995 avatar bobsonlin avatar tokomikea avatar sytjason avatar pingsutw avatar geniuslove5 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.