Skip to content

webassembly branch: generating wasm, input buffer #3444

@rajeevgUCI

Description

@rajeevgUCI

I successfully used the webassembly branch to compile a pipeline to wasm, and ran the pipeline on data in the browser. But I was wondering if my approach can be improved: is there a better way to convert a Halide pipeline to wasm, or a better way to generate an input buffer?

My current approach is:

  1. Compile Halide pipeline to .s assembly using the webassembly branch.
  2. Use binaryen to convert the .s to .wasm. I had to make a change to the webassembly branch, see my commit here.
  3. Write C++ code that creates a Halide input buffer.
  4. Use emscripten to compile the C++ code to .wasm.
  5. Write JavaScript glue code between the Halide-generated wasm and the emscripten-generated wasm.

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions