-
Notifications
You must be signed in to change notification settings - Fork 0
Add QuickJS Feasibility Survey #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/js_rs_bindings
Are you sure you want to change the base?
Add QuickJS Feasibility Survey #10
Conversation
# 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支 # 合并到主题分支。 # # 以 '#' 开始的行将被忽略,而空的提交说明将终止提交。
添加 MNN 的 JavaScript/Node.js 绑定,支持在 Node.js 应用中进行高性能深度学习推理。 主要特性: - 基于 N-API 的原生 C++ 扩展,提供接近原生的性能 - 支持 CPU、Metal、OpenCL 等多种后端 - 包含完整的 TypeScript 类型定义 - 提供简洁直观的 API 接口 - 包含多个示例:图像分类、目标检测、语义分割等 - 支持 LLM 推理功能 包含内容: - Node.js 原生绑定实现 - TypeScript 类型定义 - 构建配置 - 示例代码和测试用例 - 预训练模型示例
添加 MNN 的 Rust 语言绑定,支持在 Rust 应用中使用 MNN 进行深度学习推理,特别是 LLM 推理。 主要特性: - 使用 FFI 绑定到 MNN C++ API - 提供 Rust 风格的 API 接口 - 支持 LLM 推理功能 - 包含完整的错误处理机制 - 提供模型下载脚本 包含内容: - Rust FFI 绑定实现 - LLM API 封装 - 示例代码:llm_example、qwen_demo、qwen_inference - 构建配置 - 模型下载脚本 - 进度文档 使用方式: - 需要先构建 MNN 核心库 - 设置动态库路径后即可使用 - 支持 Qwen3-0.6B 等模型
- Add `js/test_style_transfer.js` to verify style transfer inference with MNN Node.js bindings. - Add `jimp` dependency for image processing in tests. - Fix `InterpreterWrap::CreateSession` in `js/src/interpreter.cc` to correctly return a `Session` instance. - Include test assets: `candy-9.onnx`, `input.png`, and converted `style_transfer.mnn`. - Generate `output.png` during test execution.
- Add `js/test_style_transfer.js` to verify style transfer inference with MNN Node.js bindings. - Add `jimp` dependency for image processing in tests. - Fix `InterpreterWrap::CreateSession` in `js/src/interpreter.cc` to correctly return a `Session` instance. - Include test assets: `candy-9.onnx`, `input.png`, and converted `style_transfer.mnn`. - Generate `output.png` during test execution.
…6683169831 Verify MNN JS bindings with style transfer model
…example Extends the MNN Rust bindings to include: - `Interpreter` and `Session` APIs for general model inference. - `Tensor` API for data manipulation. - `ImageProcess` API (MNN CV) for efficient image preprocessing. - New `style_transfer` example demonstrating the usage of these APIs. - Helper script `download_style_transfer_model.sh` to fetch assets and run the example. - Updated `mnn_c` C++ FFI layer to expose the necessary MNN functionalities. - Added `image` crate dependency for the example.
…example Extends the MNN Rust bindings to include: - `Interpreter` and `Session` APIs for general model inference. - `Tensor` API for data manipulation. - `ImageProcess` API (MNN CV) for efficient image preprocessing. - New `style_transfer` example demonstrating the usage of these APIs. - Helper script `download_style_transfer_model.sh` to fetch assets and run the example. - Updated `mnn_c` C++ FFI layer to expose the necessary MNN functionalities. - Added `image` crate dependency for the example.
…4747934455917 Extend Rust bindings with Interpreter, Tensor, ImageProcess and Style Transfer example
Investigated the possibility of reusing the existing N-API bindings in QuickJS. Concluded that it is infeasible due to lack of N-API support in QuickJS. Proposed an alternative solution using QuickJS FFI with the existing C API wrapper.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
8a8b90c to
9692ff5
Compare
Added
QUICKJS_SURVEY.mdwhich details the investigation into running the existing MNN Node.js bindings on QuickJS. The survey concludes that direct reuse is not possible because QuickJS does not implement the N-API ABI required bynode-addon-api. It suggests using the C API wrapper (rust/csrc/mnn_c.h) via FFI as a viable alternative.PR created automatically by Jules for task 9769435063889005762 started by @Juude