mole10 opened a new issue #5710: URL: https://github.com/apache/incubator-tvm/issues/5710
Hello all, I believe there is a bug within OpenCL codegen which results in a typo in data type identifiers. I am recently observing undefined type identifiers such as 'float44' and 'float88' in generated OpenCL codes. Here is an example. <pre><code> vstore4(((float44)(((__global float*)placeholder)[_1.s0],((__global float*)placeholder)[_1.s1],((__global float*)placeholder)[_1.s2],((__global float*)placeholder)[_1.s3])), 0, (__global float*)kernel_vec + ((((int)get_group_id(0)) * 1024) + (((int)get_local_id(0)) * 4))); </pre></code> I also found the similar problem in this post https://discuss.tvm.ai/t/bug-tvm-generate-wrong-opencl-code/6658. Here is my code to replicate this error: <pre><code> import numpy as np import topi import tvm target = tvm.target.create("opencl -device=mali") target_host = 'llvm' dshape = (1, 64, 224, 224) kshape = (64, 64, 3, 3) data = tvm.te.placeholder(dshape) kernel = tvm.te.placeholder(kshape) with target: conv = topi.mali.conv2d_nchw_spatial_pack(data, kernel, [1,1], [1,1,1,1], [1,1],"float32" ) sch = topi.mali.schedule_conv2d_nchw_spatial_pack([conv]) mod = tvm.build(sch, [data, kernel], target, target_host ) print("------opencl code------") print(mod.imported_modules[0].get_source()) </pre></code> The printed code will contain a 'float44' as shown in the example above. In addtion, my investigation of the cause leads to commit d2e58ad2fd92c09dffe064e4efbfc484cf2de6e5 https://github.com/apache/incubator-tvm/blob/d2e58ad2fd92c09dffe064e4efbfc484cf2de6e5/src/target/source/codegen_c.cc#L963 @tqchen @huochaitiantang @kevinthesun Could you please help to confirm if "t.lanes()" is unnecessary here. Thank you! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org