praeclarum / webgpu-torch

Tensor computation with WebGPU acceleration
MIT License
571 stars 15 forks source link

Deno & Deno Deploy #3

Open backspaces opened 1 year ago

backspaces commented 1 year ago

This would really be useful for Deno, especially Deno Deploy. Is a Deno port likely? Deno follows the browser's JavaScript much more closely than node, and Deno now has node hooks. Pleeeeese!

JpCapdevila commented 1 year ago

Deno used to support webgpu up until version 1.31.3. I installed that version using dvm.

Now you only need to import it like this using deno's CDN that converts npm modules to es6.

import torch from "https://esm.sh/webgpu-torch";

@praeclarum Is that the best way to do it?