I have a weird error when building an example using libtorch on linux Ubuntu 18.04:
In file included from /home/external/torch_cuda/include/c10/core/Scalar.h:9:0,
from /home/external/torch_cuda/include/ATen/core/TensorBody.h:7,
from /home/external/torch_cuda/include/ATen/Tensor.h:11,
from /home/external/torch_cuda/include/ATen/Context.h:4,
from /home/external/torch_cuda/include/ATen/ATen.h:5,
from /home/external/torch_cuda/include/torch/csrc/api/include/torch/types.h:3,
from /home/external/torch_cuda/include/torch/script.h:3,
from /home/libs/test/src/test.cpp:21:
/home/external/torch_cuda/include/c10/core/ScalarType.h:62:3: error: expected identifier before ‘int’
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
^
/home/external/torch_cuda/include/c10/core/ScalarType.h:62:3: error: expected ‘}’ before ‘int’
/home/external/torch_cuda/include/c10/core/ScalarType.h:62:3: error: expected unqualified-id before ‘,’ token
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
^
/home/external/torch_cuda/include/c10/core/ScalarType.h:62:3: error: two or more data types in declaration of ‘QInt8’
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
^
/home/external/torch_cuda/include/c10/core/ScalarType.h:62:3: error: two or more data types in declaration of ‘QUInt8’
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
^
/home/torch_cuda/include/c10/core/ScalarType.h:62:3: error: two or more data types in declaration of ‘QInt32’
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
^
/home/torch_cuda/include/c10/core/ScalarType.h:62:3: error: two or more data types in declaration of ‘BFloat16’
AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS(DEFINE_ENUM)
It seem I have an issue with this Macro AT_FORALL_SCALAR_TYPES_WITH_COMPLEX_AND_QINTS but not sure why.
Any suggestion or idea ?
Thanks