← Back to Pull requests

[WebGPU] Preserve executable export names #25195

Merged
anutosh491 merged 3 files (52 lines) on Nov 09, 2026 10:53 UTC
View on GitHub
anutosh491 anutosh491 commented on Nov 04, 2026 13:18 UTC
Author

WebGPU renames shader entry points to names like d0, but also changes the original executable export names. This breaks runtime lookup by the original dispatch name.

Keep the export name separate from the shader entry point, following the same approach as #24889 for CUDA by weimin023.

A simple add model compiles before the fix but fails to load with:
NOT_FOUND; no function named 'add_dispatch_0_elementwise_4_f32' in executable

After the fix, it loads and returns the expected result.

Diff: 52 lines (+34 / -18) across 3 files Reviewer: devtbi Review duration: 7055m
All Vouch review confidence checks passed
Residual risk 0.07 = Change Risk (0.30) × (1 − Review Confidence (0.76)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.30 · 52 lines diff across 3 files
0.30
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.52 · 5 substantive comment(s)
0.52
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
75%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.238
Real PR Conversation Timeline
8 items
devtbi devtbi commented on Nov 04, 2026 14:11 UTC
Contributor

really time for CI tests :D

devtbi devtbi commented on code on Nov 04, 2026 14:17 UTC
Code Review
runtime/src/iree/hal/drivers/webgpu/webgpu_executable.c:1
@@ -63,14 +63,14 @@ static iree_status_t iree_hal_webgpu_executable_calculate_name_storage_size(
         iree_hal_webgpu_ExportDef_vec_at(exports_vec, i);
     flatbuffers_string_t entry_point =
         iree_hal_webgpu_ExportDef_entry_point_get(export_def);
-    iree_host_size_t entry_point_length =
-        entry_point ? flatbuffers_string_len(entry_point) : 0;
-    if (entry_point_length == 0) {
+    flatbuffers_string_t name = iree_hal_webgpu_ExportDef_name_get(export_def);
+    if (!name || flatbuffers_string_len(name) == 0) name = entry_point;
+    iree_host_size_t name_length = name ? flatbuffers_string_len(name) : 0;

this and the line above looks a bit convoluted - think readability can be improved here with blocks
and looks like flatbuffers_string_len is used on the name even when it is not from the flatbuffer, and code is repeated below

devtbi devtbi requested changes on Nov 04, 2026 14:21 UTC
Changes Requested Reviewer

Requested changes.

anutosh491 anutosh491 commented on code on Nov 06, 2026 04:29 UTC
Code Review
runtime/src/iree/hal/drivers/webgpu/webgpu_executable.c:1
@@ -63,14 +63,14 @@ static iree_status_t iree_hal_webgpu_executable_calculate_name_storage_size(
         iree_hal_webgpu_ExportDef_vec_at(exports_vec, i);
     flatbuffers_string_t entry_point =
         iree_hal_webgpu_ExportDef_entry_point_get(export_def);
-    iree_host_size_t entry_point_length =
-        entry_point ? flatbuffers_string_len(entry_point) : 0;
-    if (entry_point_length == 0) {
+    flatbuffers_string_t name = iree_hal_webgpu_ExportDef_name_get(export_def);
+    if (!name || flatbuffers_string_len(name) == 0) name = entry_point;
+    iree_host_size_t name_length = name ? flatbuffers_string_len(name) : 0;

Refactored some bits here in iree_hal_webgpu_executable_export_name

anutosh491 anutosh491 commented on Nov 06, 2026 04:30 UTC
Author

really time for CI tests :D

I know. I'll take care of this really soon 🙏

devtbi devtbi approved these changes on Nov 09, 2026 10:53 UTC
Approved Reviewer

thanks, looks much better 🥳

anutosh491 anutosh491 commented on Nov 09, 2026 11:27 UTC
Author

Thanks a lot for the approval Tobias, I've made quite some prs last week that might need some reviews/help ;)

Reviewers
Assignees
anutosh491 anutosh491
Labels
risk: low confidence: 75.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 29.7% (LOW) · Higher = larger blast radius
29.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 75.6% · Lower = rushed or shallow review
75.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 7.2% · Safe to merge
7.2%
Repository