QuadTreeAttention
QuadTreeAttention copied to clipboard
Install Problem
Hi! Appreciated for your work.
Could you provide the environment required to install quadtreeattention module?
I came up with compile errors on both linux and windows system. I have different conda environments including torch1.10 and torch 1.8 (cu11.1), but all envs met different compile problems. Not sure what's the reason.
Can you post the error messages? Usually the problem is caused by cuda and pytorch version mismatch. The codes can be compiled under both cuda 10 or cuda 11. Please make sure use the pytorch version is matched cuda version.
Hi, thanks for repy.
I checked the environment following your idea. I found on my Linux machine, I used torch1.10+cu11.1 while the CUDA version is 11.2. I will reinstall torch and try again to see whether it works.
For the windows system, I finally successfully installed the module. First, just like Tang said, we need to check consistency of CUDA and torch version. Second, for anyone using windows and met the problem: error LNK2001: 无法解析的外部符号 "public: long * __cdecl at::Tensor::data<long>(void)const
, I recommand you following the guide given by the link: error LNK2001. To summarize, the problem is caused by the "long" type in the source code. "long" is interpreted as "long long"(64bit) on Linux while translated as "int"(32 bit) on Windows system. It is cross-platform problem. Just change every "long" in the code (.cpp .h .cu) to "long long" or "int64_t" should solve the problem for windows system.