huochaitiantang commented on a change in pull request #5226: [CODEGEN][CUDA] Fix vector load URL: https://github.com/apache/incubator-tvm/pull/5226#discussion_r405325498
########## 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: TVM uses uint to store unit8x4 (in function PrintType). The care will generate code like `unit x = (unit)y`, instead of `unit x = (int)y`. And what is your further opinion? ---------------------------------------------------------------- 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 With regards, Apache Git Services