Wasi:WebGPU – 一项 WebAssembly 系统接口提案
Wasi: WebGPU – A Proposed WebAssembly System Interface API

原始链接: https://github.com/WebAssembly/wasi-webgpu

**wasi:webgpu** 是一项 WebAssembly 系统接口 (WASI) 提案,旨在为 Linux、Windows、macOS、Android 及 Web 环境下的 WebAssembly 应用提供安全、可移植的 GPU 访问能力。 通过利用官方的 WebGPU 规范,该提案致力于将 Wasm 的优势(如沙盒化和跨平台兼容性)引入计算密集型任务,包括 AI/ML 推理、科学模拟、服务端图形流媒体和数据处理。 虽然该提案与 WebGPU 标准紧密结合,但为了适应非 Web、非 JavaScript 环境,它也包含了必要的修改。值得注意的是,该 API 仅专注于 GPU 计算;与屏幕显示或窗口管理相关的任务不在本提案范围内,并将由其他独立的 WASI 项目并行处理。该倡议目前处于第二阶段,其详细的 API 定义、设计权衡和实现策略均已在 WIT 文件及技术规范中记录。

Hacker News | 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 提交 | 登录 Wasi: WebGPU – 一个提议的 WebAssembly 系统接口 API (github.com/webassembly) 18 点,由 giancarlostoro 发布于 1 小时前 | 隐藏 | 往期 | 收藏 | 1 条评论 | 帮助 itomato 5 分钟前 [–] 非常感谢以下人士提供的宝贵反馈与建议: [Person 1] [Person 2] [等等] 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A proposed WebAssembly System Interface API.

Phase 2

Linux, Windows, MacOS, Android, Web.

wasi:webgpu is a WASI proposal for GPU access in WebAssembly.

Goals [or Motivating Use Cases, or Scenarios]

Bring the benefits of Wasm (portability, security, sandboxing) to GPU compute. Use cases include, but are not limited to:

  • Server-side graphics streaming.
  • Scientific computing and simulations.
  • AI/ML inference and training.
  • Image and video processing.
  • Data visualization and rendering.
  • Displaying to a screen / windowing API — out of scope here, but active work is happening in other projects that may eventually become their own wasi proposals (e.g., wasi-gfx).

The full API documentation can be found in imports.md.

wasi:webgpu is based on the official WebGPU spec. It deviate in some cases from the webgpu spec, namely, in cases where the spec makes assumptions about running in a web or JS environment. Wherever wasi:webgpu deviates from the spec, a clear explanation should be documented.

[Provide example code snippets and diagrams explaining how the API would be used to solve the given problem]

[etc.]

Detailed design discussion

[This section should mostly refer to the .wit.md file that specifies the API. This section is for any discussion of the choices made in the API which don't make sense to document in the spec file itself.]

[Tricky design choice #1]

[Talk through the tradeoffs in coming to the specific design point you want to make.]

// Illustrated with example code.

[This may be an open question, in which case you should link to any active discussion threads.]

[etc.]

[This section is not required if you already covered considered alternatives in the design discussion above.]

[Describe an alternative which was considered, and why you decided against it.]

[etc.]

Stakeholder Interest & Feedback

TODO before entering Phase 3.

[This should include a list of implementers who have expressed interest in implementing the proposal]

References & acknowledgements

Many thanks for valuable feedback and advice from:

  • [Person 1]
  • [Person 2]
  • [etc.]
联系我们 contact @ memedata.com