gnguralnick commented on code in PR #18961:
URL: https://github.com/apache/tvm/pull/18961#discussion_r3024084987


##########
web/src/webgpu.ts:
##########
@@ -759,32 +766,28 @@ export class WebGPUContext {
         const sizeOfI32 = 4;
         const bufBytes = (podArgIndices.length + 1) * sizeOfI32;
         const podArgBuffer = this.getUniformFromPool(bufBytes);
-        const i32View = new Int32Array(podArgIndices.length + 1);
-        const u32View = new Uint32Array(i32View.buffer);
-        const f32View = new Float32Array(i32View.buffer);
 
         for (let i = 0; i < podArgIndices.length; ++i) {
           const value = args[podArgIndices[i]];
           const dtype = finfo.arg_types[podArgIndices[i]];
           if (dtype.startsWith("int")) {
-            i32View[i] = value;
+            i32ViewCached[i] = value;
           } else if (dtype.startsWith("uint")) {
-            u32View[i] = value;
+            u32ViewCached[i] = value;
           } else if (dtype.startsWith("float")) {
-            f32View[i] = value;
+            f32ViewCached[i] = value;

Review Comment:
   Not sure if this needs to be in scope here though it does seem like a good 
suggestion



-- 
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]

Reply via email to