Code Monkey home page Code Monkey logo

zzy82518996 / hb-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cornell-brg/hb-pytorch

0.0 1.0 0.0 149.46 MB

Repo to hold HammerBlade PyTorch port. Based on PyTorch v1.4.0

License: Other

Python 31.70% Shell 0.61% C++ 51.54% Dockerfile 0.07% Batchfile 0.04% CMake 1.75% Makefile 0.17% Java 0.17% C 5.00% Cuda 7.53% Assembly 0.31% Metal 0.11% Objective-C++ 0.64% Objective-C 0.01% PureBasic 0.29% LLVM 0.01% Yacc 0.01% CSS 0.01% HTML 0.01% Ruby 0.03%

hb-pytorch's Introduction

PyTorch Logo


PyTorch HammerBlade Port

This work aims to port PyTorch to HammerBlade.

How to build

This assumes that you have a working COSIM installed. Then you can either put hb-pytorch under bsg_bladerunner, or set BRG_BSG_BLADERUNNER_DIR to your bladerunner path.

  • Clone hb-pytorch repo git clone -b hb-device [email protected]:cornell-brg/hb-pytorch.git
  • Create python virtual environment python3.6 -m venv ./venv_pytorch python3.6 -m venv ./venv_pytorch
  • Install dependencies pip install numpy pyyaml mkl mkl-include setuptools cmake cffi typing sklearn tqdm pytest
  • Init pytorch third party dependencies git submodule update --init --recursive
  • Setup building environment variables. You need to edit hb-pytorch/setup_cosim_build_env.sh and set BSG_MANYCORE_DIR to <bsg_bladerunner>/bsg_replicant/libraries
  • Build pytorch. This step can take up to 15 minutes cd hb-pytorch && python setup.py install

Run Pytests

  • Goto hb-pytorch directory cd hb-pytorch
  • Run pytest source ./run-hb-pytest.sh

Important files and directories related to HammerBlade

files used to run pytest (adapted from Baseline)

  • fragments/
  • environment.mk
  • baseline-README.md
  • run-hb-pytest.sh (source this one to run pytest!)
  • hb_device/torch/

HammerBlade device code

  • hb_device/torch/kernel

Pytest tests

  • hb_device/torch/tests/
  • hb_device/torch/tests/targets.py (Register a new test here!)

files that interacts with HammerBlade CUDALite runtime

  • c10/hammerblade/

hb-pytorch's People

Contributors

ezyang avatar soumith avatar gchanan avatar apaszke avatar colesbury avatar zdevito avatar yangqing avatar zou3519 avatar ssnl avatar smessmer avatar pietern avatar jerryzh168 avatar bddppq avatar bwasti avatar houseroad avatar goldsborough avatar onnxbot avatar suo avatar killeent avatar peterjc123 avatar xuhdev avatar vishwakftw avatar jspark1105 avatar pjh5 avatar mingzhe09088 avatar andresy avatar orionr avatar t-vi avatar xiaomengy avatar wanchaol avatar

Watchers

James Cloos 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.