Graal CE JVM | |
---|---|
Linux Ubuntu 16.04 |
These builds are without MegaGuards since Travis CI does not support GPU testing
ZipPy is a fast and lightweight Python 3 implementation built using the Truffle framework. ZipPy leverages the underlying Java JIT compiler and compiles Python programs to highly optimized machine code at runtime.
ZipPy is currently maintained by Secure Systems and Software Laboratory at the University of California, Irvine.
MegaGuards is a guards optimization and transparent heterogenous computing system that built on top of Truffle framework. MegaGuards analyze and execute AST on Truffle and OpenCL. Currently, MegaGuards works only on Linux x86 64-Bit and has been tested on Ubuntu x86 64-Bit 16.04.
MegaGuards is currently maintained by Secure Systems and Software Laboratory at the University of California, Irvine.
$ mkdir megaguards && cd megaguards
$ python -c "$(curl -fsSL https://raw.github.com/securesystemslab/zippy-megaguards/getting-zippy-megaguards.py)"
Some prerequisites require
sudo
privilege to be installed.
-
Create a working directory (
$MEGAGUARDS_ROOT
)$ mkdir megaguards && cd megaguards $ export MEGAGUARDS_ROOT=$PWD
-
Download JDK with JVMCI 8 v0.46 and decompress it.
$ tar -xzf labsjdk-8u172-jvmci-0.46-linux-amd64.tar.gz
-
Install system dependencies:
$ sudo apt-get install build-essential $ sudo apt-get install git wget curl $ sudo apt-get install ocl-icd-opencl-dev clinfo
-
Install GPU and/or CPU drivers (that includes OpenCL icd) from the appropriate vendor based on your system specs.
-
NVIDIA:
https://www.geforce.com/drivers OR $ sudo add-apt-repository ppa:graphics-drivers $ sudo apt-get update $ sudo apt-get install nvidia-390
-
AMD:
https://support.amd.com/en-us/download
-
Intel:
https://software.intel.com/en-us/articles/opencl-drivers
-
Clone mxtool:
$ cd $MEGAGUARDS_ROOT $ git clone https://github.com/graalvm/mx.git
-
Append the
mx
build tool directory to yourPATH
.$ export PATH=$MEGAGUARDS_ROOT/mx:$PATH
-
Clone ZipPy+MegaGuards:
$ git clone https://github.com/securesystemslab/zippy-megaguards.git
-
Create a file
$MEGAGUARDS_ROOT/zippy-megaguards/mx.zippy/env
and add JDK pathJAVA_HOME=/path/to/labsjdk1.8.0_172-jvmci-0.46 ## replace path with correct one. ## DEFAULT_VM=server DEFAULT_DYNAMIC_IMPORTS=truffle/compiler ZIPPY_MUST_USE_GRAAL=1
For more information please visit the ZipPy Wiki.
$ cd $MEGAGUARDS_ROOT/zippy-megaguards
$ mx build
$ cd $MEGAGUARDS_ROOT/zippy-megaguards
$ mx mg --init
$ mx mg --clinfo
Please try to solve any error
that our check script encounter.
$ mx mg --simple-example
To enable MegaGuards use:
--mg-target=truffle
to execute using a guardless Truffle AST on Graal.
--mg-target=gpu
to execute on a GPU OpenCL device.
--mg-target=cpu
to execute on a CPU OpenCL device.
--mg-target
to execute using our adaptive OpenCL device selection.
$ cd $MEGAGUARDS_ROOT/zippy-megaguards
$ mx python <file.py> --mg-target=gpu
$ cd $MEGAGUARDS_ROOT/zippy-megaguards
$ mx junit
$ mx junit-mg
- ZipPy is still under development and not all language features are available.
- ZipPy require few runs to reach optimal performance results.