This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new 6892b01c0b [Unity] hotfix webgpu codegen for vec load (#14630)
6892b01c0b is described below
commit 6892b01c0b8d56034c9f682dfe935fbf8341f485
Author: Tianqi Chen <[email protected]>
AuthorDate: Sat Apr 15 08:43:33 2023 -0400
[Unity] hotfix webgpu codegen for vec load (#14630)
---
src/target/source/codegen_webgpu.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/target/source/codegen_webgpu.cc
b/src/target/source/codegen_webgpu.cc
index 95c46b8894..ab4c2605bd 100644
--- a/src/target/source/codegen_webgpu.cc
+++ b/src/target/source/codegen_webgpu.cc
@@ -491,6 +491,7 @@ void CodeGenWebGPU::VisitExpr_(const BufferLoadNode* op,
std::ostream& os) { //
// vec3<f32>(buf[index[0]], buf[index[1]], buf[index[2]]);
std::string index_vid = SSAGetID(PrintExpr(index), index.dtype());
PrintType(element_dtype.with_lanes(value_dtype.lanes()), os);
+ os << "(";
for (int i = 0; i < lanes; ++i) {
if (i != 0) os << ", ";
os << buffer_vid << "[" << index_vid << "[" << i << "]]";