Skip to content

Add python implementation for wgsl-gen#28355

Draft
danielsongmicrosoft wants to merge 3 commits intomicrosoft:mainfrom
danielsongmicrosoft:user/danielsong/templatelibrarypythonport
Draft

Add python implementation for wgsl-gen#28355
danielsongmicrosoft wants to merge 3 commits intomicrosoft:mainfrom
danielsongmicrosoft:user/danielsong/templatelibrarypythonport

Conversation

@danielsongmicrosoft
Copy link
Copy Markdown

@danielsongmicrosoft danielsongmicrosoft commented May 4, 2026

Description

Replaces the npm-based @fs-eire/wgsl-template Node.js engine used by the WebGPU EP's static build path with an in-tree, stdlib-only Python implementation under wgsl_templates. The dynamic generator path is unchanged.

Motivation and Context

@danielsongmicrosoft danielsongmicrosoft marked this pull request as draft May 4, 2026 23:23
@guschmue guschmue added the ep:WebGPU ort-web webgpu provider label May 5, 2026
@guschmue
Copy link
Copy Markdown
Contributor

guschmue commented May 5, 2026

I think this should move to tools/python/

@danielsongmicrosoft
Copy link
Copy Markdown
Author

danielsongmicrosoft commented May 5, 2026

Did some manual testing for confirmation:

  • Built ORT with --use_webgpu --wgsl_template static --config RelWithDebInfo
    • I believe this exercises the new py tool against all 27 in-tree .wgsl.template files and c++ compiler accepted it
  • Ran onnxruntime_provider_test.exe with GTX 1060 6GB (what I have on my dev box) for Pad, Transpose, and Conv operator suites.
    • 317/318 tests passed, the 1 failure was due to an fp16 compatibility issue with my GPU

@danielsongmicrosoft
Copy link
Copy Markdown
Author

@danielsongmicrosoft please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:WebGPU ort-web webgpu provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants