@smth  Hi, Thanks for your attention.
I install the pytorch via pip (in a pyenv managed enviroment) and only one instance is installed.
I tried on different machines, such as
1080ti + CUDA9.0
2080ti + CUDA10.0
I set up a quick demo in repo: https://github.com/blueardour/extension-demo.git 1
There are two extensions inside. The only differece is the  datatype of the codec vairable. As I mentioned in the original post, if all the tensors are the same type, no error occur. Otherwise I met the undefined error. (It indeed could be worked around to force all tensor as the same datatype, however I just want to try to reduce the data precision for runtime memory saving in my real applications.)
to run: python demo.py
gives:
<built-in method dispatch of PyCapsule object at 0x7fe5b02e4510>
demo2 build failed