libaihong opened a new pull request #5428:
URL: https://github.com/apache/incubator-tvm/pull/5428
When I test with vectorized load&store for char2, there is a cuda
compilation error:
_RuntimeError: Compilation error:
/tmp/tmpa87wlle2/my_kernel.cu(3093): error: no operator "=" matches these
operands
operand types are: char2 = int
/tmp/tmpa87wlle2/my_kernel.cu(3094): error: no operator "&" matches these
operands
operand types are: char2 & int
/tmp/tmpa87wlle2/my_kernel.cu(3096): error: no operator ">>" matches these
operands
operand types are: char2 >> int
/tmp/tmpa87wlle2/my_kernel.cu(3097): error: no operator ">>" matches these
operands
operand types are: char2 >> int_
The error occurs at the pieces of cuda codes generated by TVM as below:
`char2 _66;`
`_66=((signed char)(_67.x) << 0); `
`_66=_66 & ~(0x000000ff << 8) |((signed char)(_67.y) << 8);`
`((signed char*)T_cast)[_1.x] = ((char)(_66 >> 0));`
`((signed char*)T_cast)[_1.y] = ((char)(_66 >> 8));`
The “_66” is a char2 vector, but it is used as a scalar, which is the cause
of this issue. However, the root cause is that the vectorized load/store for
char2 is not supported. After fix this problem, the generated cuda codes are
listed as following:
`char2 _66;`
`_66.x=((signed char)(_67.x));`
`_66.y=((signed char)(_67.y)); `
`((signed char*)T_cast)[_1.x] = _66.x;`
`((signed char*)T_cast)[_1.y] = _66.y;`
@vinx13 , could you please help review? 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:
[email protected]