Xtra-Computing / thundergbm

ThunderGBM: Fast GBDTs and Random Forests on GPUs
Apache License 2.0
695 stars 88 forks source link

#error: STL1002: Unexpected compiler version, expected CUDA 10.1 Update or newer #61

Open AlanSpencer2 opened 3 years ago

AlanSpencer2 commented 3 years ago

I followed your instructions "How to build the Python wheel file for Windows". When I try to build thundergbm.sln in Visual Studio, I get the following error: "#error: STL1002: Unexpected compiler version, expected CUDA 10.1 Update or newer"

I have CUDA version 11.1. Could this be the cause of thunderGBM not building or is there something else?

Please see the picture below for more detailed information about the error.

thundergbm ERROR message in visual studio

Kurt-Liuhf commented 3 years ago

Hi @AlanSpencer2, thanks for your feedback. Can you try compiling thunderGBM with this branch? It is for CUDA 11 adaption. If the library still cannot be compiled successfully, I suggest that you should upgrade your c++ compiler.

AlanSpencer2 commented 3 years ago

I downloaded the branch with the following command but got the same error as before when trying to build it: "git clone -b support_cuda11 --single-branch https://github.com/zeyiwen/thundergbm.git"

When it comes to compiler version, I downloaded "Desktop development with C++" only a few days ago for Visual Studio 2019. What compiler version do you require?

Please see the following image for detailed info about the error. The last two rows are slightly different than the original error above.

compiler error

Kurt-Liuhf commented 3 years ago

Hi @AlanSpencer2, it seems that your CUDA library is not configured or installed correctly. Please refer to this link (or other CUDA installation tutorials) and check your system path mentioned in the section 5.3. After correct installation of CUDA 11, nvcc --version should work in your terminal. In terms of the errors shown in the last two rows, have you run git submodule init && git submodule udpate before compiling for the initialization of cub module?

AlanSpencer2 commented 3 years ago

What makes you think that the problem is caused by CUDA not being correctly installed?

I just ran XGBoost in Python, which utilizes CUDA for parallel computation on the GPU. And it worked just fine.

In Python I get the following information, that shows that CUDA 11 is correctly installed, and the GPU is accessible and ready to be used. Please see the pircture below.

image

And yes, I did run "git submodule init && git submodule udpate".

cmd picture