Git Product home page Git Product logo

webcl-translator's Introduction

webcl-translator

logo

Requirement :

Python2.7

NodeJS

Emscripten Tutorial

Emscripten Fastcomp

Emscripten Fastcomp Clang

WebCL Validator

How To (OSX) :

Step 1 :

install python and nodejs on your system

cd YOUR_ROOT_DIRECTORY
git clone https://github.com/kripken/emscripten-fastcomp.git -b incoming
cd emscripten-fastcomp/tools/
git clone https://github.com/kripken/emscripten-fastcomp-clang.git -b incoming clang
build the llvm/clang emscripten-fastcomp using "configure --enable-optimized --disable-assertions --enable-targets=host,js"

cd YOUR_ROOT_DIRECTORY
git clone https://github.com/KhronosGroup/webcl-validator
build the llvm/clang webcl-validator
go inside your binary build folder and type :
"install_name_tool -change libclv_standalone.dylib @executable_path/../lib/libclv_standalone.dylib"

Step 2 :

cd YOUR_ROOT_DIRECTORY
git clone https://github.com/wolfviking0/webcl-translator
cd webcl-translator/
git submodule init
git submodule update

Step 3 :

cd YOUR_ROOT_DIRECTORY
rm ~/.emscripten
rm -rf ~/.emscripten_cache
cd webcl-translator/emscripten
./emcc --help
open ~/.emscripten
set LLVM_ROOT with your llvm path
add LLVM_VALIDATOR_ROOT with your webcl-validator path

Step 4 :

cd YOUR_ROOT_DIRECTORY/webcl-translator
python automator.py --help
or
cd YOUR_ROOT_DIRECTORY/webcl-translator/webcl
make

General :

webcl-translator is an OpenCL to WebCL converter, it's based on the Emscripten LLVM-to-JavaScript compiler.

Need webkit-webcl from Samsung research for OS X 10.8, you can use my custom version of webkit-webcl for OS X 10.9.

Links to demos, tutorial, patch, etc: Wiki

Automator :

At the top of the repositories, you can use python automator.py for update all the samples repositories and automaticaly build all the demos.

You can call python automator.py -h for call the automator script help.

Validator :

You can use the webcl-validator with the webcl-translator. You need to add the LLVM_VALIDATOR_ROOT inside the ~/.emscripten config file.

If you build a sample using settings -s CL_VALIDATOR=1, automaticaly all the .cl file embedded are modify by the validator. You can specify parameter to the webcl-validator using -s CL_VAL_PARAM='["-DPARAM1","-DPARAM2"]'.

Settings.js :

The sample are using a Settings.js file who automaticaly add parameter to all the webcl-translator samples. When you launch the translator.html file (and all the html samples files from the samples repositories), you can add some parameter:

&gl=on/off 			:	Add a canvas inside the webpage				
&validator=on/off 	:	Enable the validator, call val_.....js samples 
&profile=on/off 	:	Enable the console profile of the browser	
&export=on/off		:	Open a new page with stack_tracer (if enabled)

Samples repositories :

OSX Samples

OCLToys

David Bucciarelli

OpenCL Book Samples

OpenCL Nvidia Samples

License :

webcl-translator is MIT licensed, see LICENSE.

webcl-translator's People

Contributors

anthonyliot avatar steveneliuk avatar wolfviking0 avatar

Stargazers

 avatar

Watchers

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