You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/04/01 11:13:47 UTC

[tvm] branch main updated: [CodeGen][OpenCL] Limit OpenCL built-in vector lanes to 2, 3, 4, 8, 16. (#7777)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 3825161  [CodeGen][OpenCL] Limit OpenCL built-in vector lanes to 2, 3, 4, 8, 16. (#7777)
3825161 is described below

commit 38251611427edf002b63599321e56bf30fb8c9b0
Author: xndcn <xn...@gmail.com>
AuthorDate: Thu Apr 1 19:13:33 2021 +0800

    [CodeGen][OpenCL] Limit OpenCL built-in vector lanes to 2, 3, 4, 8, 16. (#7777)
---
 src/target/source/codegen_opencl.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/target/source/codegen_opencl.cc b/src/target/source/codegen_opencl.cc
index 0f79df3..f72f3f2 100644
--- a/src/target/source/codegen_opencl.cc
+++ b/src/target/source/codegen_opencl.cc
@@ -120,7 +120,7 @@ void CodeGenOpenCL::PrintType(DataType t, std::ostream& os) {  // NOLINT(*)
         break;
     }
     if (!fail && lanes == 1) return;
-    if (!fail && (lanes >= 2 && lanes <= 16)) {
+    if (!fail && ((lanes >= 2 && lanes <= 4) || lanes == 8 || lanes == 16)) {
       os << lanes;
       return;
     }
@@ -154,7 +154,7 @@ void CodeGenOpenCL::PrintType(DataType t, std::ostream& os) {  // NOLINT(*)
         break;
     }
     if (!fail && lanes == 1) return;
-    if (!fail && (lanes >= 2 && lanes <= 16)) {
+    if (!fail && ((lanes >= 2 && lanes <= 4) || lanes == 8 || lanes == 16)) {
       os << lanes;
       return;
     }