akaashrp opened a new pull request, #20132: URL: https://github.com/apache/tvm/pull/20132
Allow WebGPU code generation for local and workgroup allocations whose symbolic extents have finite compile-time upper bounds. WGSL requires array lengths to be compile-time constants, so codegen uses arithmetic analysis to derive and emit a static upper bound for expressions such as `min(n, 64)` (unbounded or nonpositive extents are rejected). This PR: - Detects element-count, byte-size, and aggregate workgroup-memory overflow - Computes allocation sizes using WGSL array element stride - Applies WebGPU's per-workgroup-variable 16-byte size rounding - Tracks total workgroup storage used by each generated entry point - Enforces `max_shared_memory_per_block`, corresponding to WebGPU's `maxComputeWorkgroupStorageSize` - Sets the default WebGPU limit to 32 KiB to match TVM's JavaScript runtime contract while permitting target-specific overrides -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
