I tried to compiler Nvidia fastertransformer, i got so file when compiling custom c++ function, but got error when compiling custom c++ class:
error: no matching function for call to ‘torch::class_<torch_ths::FasterTransformerEncoder>::class_(const char [25])’
torch::jit::class_<torch_ths::FasterTransformerEncoder>("FasterTransformerEncoder")
I searched for the reason, some search results told me it may be environment problem, but i don’t know the exact reason, my environment is:
- Pytorch 1.6
- CUDA 10.2
- GCC 7.5.0
- CMake 3.18.0-rc3
- Centos 7
And -DCXX_STD=14 in cmake command