tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] wpan11nv commented on a change in pull request #5226: [CODEGEN][CUDA] Fix vector load
Date Thu, 09 Apr 2020 17:12:25 GMT
wpan11nv commented on a change in pull request #5226: [CODEGEN][CUDA] Fix vector load
URL: https://github.com/apache/incubator-tvm/pull/5226#discussion_r406352686
 
 

 ##########
 File path: src/target/source/codegen_cuda.cc
 ##########
 @@ -591,13 +591,17 @@ void CodeGenCUDA::VisitExpr_(const RampNode* op, std::ostream&
os) {
 }
 
 void CodeGenCUDA::VisitExpr_(const BroadcastNode* op, std::ostream& os) {   // NOLINT(*)
-  if (op->dtype.is_int() && op->dtype.bits() == 8 && op->lanes ==
4) {
+  if ((op->dtype.is_int() || op->dtype.is_uint()) && op->dtype.bits() ==
8 && op->lanes == 4) {
     // make_int8x4
     const int64_t *p = as_const_int(op->value);
     CHECK(p);
     int64_t v = *p & 0xFF;
     v = (v << 24) | (v << 16) | (v << 8) | v;
-    os << "(int)" << v;
+    if (op->dtype.is_uint()) {
 
 Review comment:
   Can we keep it as is? I do not see benefits from this change. Otherwise the entire PR LGTM.
Thanks!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message