Skip to content

Wenzhao-Xiang/webml-polyfill-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webml-polyfill-wasm

Fork of https://android.googlesource.com/platform/frameworks/ml

Build

Prerequisites

  1. Python, node.js, CMake, and Java are not provided by emsdk. Make sure you have installed these beforehand with the system package manager.

  2. Install Emscripten.

Steps

Clone the source code

$ git clone https://github.com/Wenzhao-Xiang/webml-polyfill-wasm.git

Initialize and update the submodule

$ cd webml-polyfill-wasm/
$ git submodule update --init --recursive

Download tensorflow dependencies

$ cd external/tensorflow/
$ ./tensorflow/contrib/makefile/download_dependencies.sh

Create a new directory ./build

$ cd ../../
$ mkdir build
$ cd build

Set CMAKE_TOOLCHAIN_FILE for cross compilation

$ cmake -D CMAKE_TOOLCHAIN_FILE=/yourDownloadDir/emsdk/emscripten/yourVersion/cmake/Modules/Platform/Emscripten.cmake ..

Compile the source code and generate the output file nn_ops.js

$ make

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages