[Q] "TVMError: Cannot convert type int64x4 to CUDA type on a L32 platform" - test_ewise.py::test_add fails

Hello all,

I have built tvm with python bindings on Windows. Now I’m testing it and found that some tests fail.

I run python -m pytest -v tvm_source/tests/python/integration and test_ewise.py::test_add fails with:

def test_add():
    def run(dtype):
E   File "...\tvm_source\src\target\source\codegen_cuda.cc", line 247
E   TVMError: Cannot convert type int64x4 to CUDA type on a L32 platform

(I omitted some details.)

Basically my CUDA looks like working with the GPU correctly:

import tvm



Can you please help how to make this test pass?
Can you please tell what the error message and the “L32 platform” mean?

Studying codegen_cuda.cc did not help me, I’m quite a newbie in tvm, in fact I just would like to make a package from it on Windows. :slight_smile:


  • I build tvm from source code version 0.7dev1
  • Statically linked with llvm 9.0.1
  • Cuda 10.2 and cudnn
  • On Windows 10, 64 bit
  • msvc: cl.exe 19.16 (Visual Studio 2017)

Any help appreciated!

It seems that for Windows sizeof(long)=4 (here) while it is typically 8 for other platforms. Since longlong3 and longlong4 are now supported since CUDA 10, maybe you can try replace L247 to something like

if (t.lanes() == 3){
  os << "longlong3";
  os << "longlong4";

, if you need int64 support.

Thank you very much for your comment!

However it seems to me, that the current code (and/or tests) simply do not fully support Windows. Looks like primarily the test code… E.g. from https://github.com/apache/incubator-tvm/pull/5853/checks it seems to me, that tests are not run on Windows CI…