Coder Social home page Coder Social logo

kartdsam / sofa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyliustack/sofa

0.0 2.0 0.0 57.19 MB

SOFA (Swarm-Oriented Function Call Analysis)

License: Apache License 2.0

Python 11.48% Shell 1.20% C 4.08% C++ 57.05% Makefile 0.56% Rich Text Format 11.61% Batchfile 0.03% Objective-C 0.63% HTML 1.37% JavaScript 0.09% Dockerfile 0.03% Cuda 0.07% Jupyter Notebook 11.81%

sofa's Introduction

Introduction

SOFA: SOFA (Swarm-Oriented Function Call Analysis) Authors: All the contributors of SOFA

Prerequisite

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

Verify Permissions

Run the following simple tests to verify the permission settings of executing tcpdump under your permission.

  • tcpdump -w sofa.pcap
  • tcpdump -r sofa.pcap

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.

Uninstall

Run bash </PATH/TO/INSTALL>/sofa/tools/uninstall.sh to safely remove/uninstall files of SOFA.

Usages

SOFA supports serveral different usages, like how one can use perf.

Basic Statistics

  1. Profile your program by sampling involved CPUs:
    sofa stat "wget http://www.bbc.com/news"
  2. Profile your program by sampling all CPUs:
    sofa stat "wget http://www.bbc.com/news" --profile_all_cpus

Performance Visualizations

  1. sofa record "wget http://www.bbc.com/news"
  2. sofa report
  3. Open browser with one of the following links for different visualizations

Run SOFA Module-by-module

  1. Run sofa record "wget http://www.bbc.com/news" only once to record the events.
  2. Run sofa preprocess only once to process raw performance data and generate immediate results.
  3. Run sofa analyze performance statistics will be displayed on your console
  4. Run sofa viz --viz_port=8000 dynamic trace will be displayed on port 8000 (default)

Configurations

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

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

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

bobsonlin avatar cyliustack avatar geniuslove5 avatar liujames avatar medicineyeh avatar oranger239 avatar pjw91 avatar s9013xx avatar sjeemb avatar softdi avatar sytjason avatar tokomikea avatar wei-yuan avatar

Watchers

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