Skip to content

feat: additional builder API features for torch2webnn - #30

Merged
mtavenrath merged 1 commit into
rustnn:mainfrom
theHamsta:new_uncompiled
Nov 6, 2026
Merged

mtavenrath merged 1 commit into
rustnn:mainfrom
theHamsta:new_uncompiled

Conversation

@theHamsta

@theHamsta theHamsta commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

The APIs are used at rustnn/torch2webnn#3

On top of #29

self.inner_mut()?
.rustnn_webnn_text_for_outputs(&outputs)
.ok_or_else(|| PyValueError::new_err("Unable to serialize graph outputs"))
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those could also use pythonic short names instead of the rustnn_XXX from RustNN

Comment thread src/python/operand.rs
pub(crate) handle: rustnn::mlcontext::MLOperand,
pub(crate) builder_id: u64,
pub(crate) shape: Vec<u64>,
pub(crate) data_type: String,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could avoid copying state (shape, data_type) if we used the same API as RustNN that takes builder as arg. This API is a bit more pythonic.

@theHamsta
theHamsta force-pushed the new_uncompiled branch 3 times, most recently from 9f0b8f6 to ce03ca7 Compare November 6, 2026 17:24
@mtavenrath
mtavenrath merged commit 53cc355 into rustnn:main Nov 6, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants