GithubHelp home page GithubHelp logo

umunusb1 / plaidml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bhardwajrahul/plaidml

0.0 0.0 0.0 77.15 MB

PlaidML is a framework for making deep learning work everywhere.

Home Page: http://vertex.ai

License: GNU Affero General Public License v3.0

Python 15.95% C++ 47.01% Objective-C 11.71% C 0.01% CMake 0.01% PLSQL 24.85% Lex 0.06% Yacc 0.40%

plaidml's Introduction

A platform for making deep learning work everywhere.

Vertex.AI (the creators of PlaidML) is excited to join Intel's Artificial Intelligence Products Group. PlaidML will soon be re-licensed under Apache 2. Read the announcement here!

Build Status

PlaidML is the easiest, fastest way to learn and deploy deep learning on any device, especially those running macOS or Windows:

  • Fastest: PlaidML is often 10x faster (or more) than popular platforms (like TensorFlow CPU) because it supports all GPUs, independent of make and model.
    • PlaidML accelerates deep learning on AMD, Intel, NVIDIA, ARM, and embedded GPUs.
  • Easiest: PlaidML is simple to install and supports multiple frontends (Keras and ONNX currently)
  • Free: PlaidML is completely open source and doesn't rely on any vendor libraries with proprietary and restrictive licenses.

For most platforms, getting started with accelerated deep learning is as easy as running a few commands (assuming you have Python (v2 or v3) installed (if this doesn't work, see the installation instructions):

virtualenv plaidml
source plaidml/bin/activate
pip install plaidml-keras plaidbench

Choose which accelerator you'd like to use (many computers, especially laptops, have multiple):

plaidml-setup

Next, try benchmarking MobileNet inference performance:

plaidbench keras mobilenet

Or, try training MobileNet:

plaidbench --batch-size 16 keras --train mobilenet

About PlaidML

PlaidML is a multi-language acceleration platform that:

  • Enables practitioners to deploy high-performance neural nets on any device
  • Allows hardware developers to quickly integrate with high-level frameworks
  • Allows framework developers to easily add support for many kinds of hardware
  • Works on all major platforms โ€” Linux, macOS, Windows
  • Allows developers to create hardware accelerated, novel, performance portable research kernels.

For examples and benchmarks, see our blog.

Recent Release Notes

  • PlaidML 0.3.3 - 0.3.5
    • Support Keras 2.2.0 - 2.2.2
    • Support ONNX 1.2.1
    • Upgrade kernel scheduling
    • Revise documentation
    • Add HALs for CUDA and Metal
    • Various bugfixes and improvements
  • PlaidML 0.3.2
    • Now supports ONNX 1.1.0 as a backend through onnx-plaidml
    • Preliminary support for LLVM. Currently only supports CPUs, and only on Linux and macOS. More soon.
    • Support for LSTMs & RNNs with static loop sizes, such as examples/imdb_lstm.py (from Keras)
      • Training networks with embeddings is especially slow (#96)
      • RNNs are only staticly sized if the input's sequence length is explicitly specified (#97)
      • Fixes bug related to embeddings (#92)
    • Adds a shared generic op library in python to make creating frontends easier
      • plaidml-keras now uses this library
    • Uses plaidml/toolchain for builds
      • Building for ARM is now simple (โ€“-config=linux_arm_32v7)
    • Various fixes for bugs (#89)

Validated Hardware

Vertex.AI runs a comprehensive set of tests for each release against these hardware targets:

  • AMD
    • R9 Nano
    • RX 480
    • Vega 10
  • NVIDIA
    • K80, GTX 780, GT 640M
    • GTX 1070, 1050
  • Intel
    • HD4000
    • HD Graphics 505

Validated Networks

We support all of the Keras application networks from current versions of 2.x. Validated networks are tested for performance and correctness as part of our continuous integration system.

  • CNNs

    • Inception v3
    • ResNet50
    • VGG19
    • Xception
    • MobileNet
    • DenseNet
    • ShuffleNet
  • LSTM

    • examples/imdb_lstm.py (from keras)

Installation Instructions

See detailed per platform instructions here.

Plaidvision and Plaidbench

We've developed two open source projects:

  • plaidvision provides a simple shell for developing vision applications using your webcam
  • plaidbench is a performance testing suite designed to help users compare the performance of different cards and different frameworks

Hello VGG

One of the great things about Keras is how easy it is to play with state of the art networks. Here's all the code you need to run VGG-19:

#!/usr/bin/env python
import numpy as np
import os
import time

os.environ["KERAS_BACKEND"] = "plaidml.keras.backend"

import keras
import keras.applications as kapp
from keras.datasets import cifar10

(x_train, y_train_cats), (x_test, y_test_cats) = cifar10.load_data()
batch_size = 8
x_train = x_train[:batch_size]
x_train = np.repeat(np.repeat(x_train, 7, axis=1), 7, axis=2)
model = kapp.VGG19()
model.compile(optimizer='sgd', loss='categorical_crossentropy',
              metrics=['accuracy'])

print("Running initial batch (compiling tile program)")
y = model.predict(x=x_train, batch_size=batch_size)

# Now start the clock and run 10 batches
print("Timing inference...")
start = time.time()
for i in range(10):
    y = model.predict(x=x_train, batch_size=batch_size)
print("Ran in {} seconds".format(time.time() - start))

License

PlaidML is licensed under the AGPLv3.

Our open source goals include 1) helping students get started with deep learning as easily as possible and 2) helping researchers develop new methods more quickly than is possible with other tools. PlaidML is unique in being fully open source and free of dependence on libraries like cuDNN that carry revocable and redistribution-prohibiting licenses. For situations where an alternate license is preferable please contact [email protected].

Reporting Issues

Either open a ticket on GitHub or post to plaidml-dev.

plaidml's People

Contributors

choongng avatar choongvertex avatar earhart avatar flaub avatar marctc avatar mars1026 avatar sohnryang avatar sw1sh avatar timfelixbeyer avatar tzerrell 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.