Running xgboost-RGPU from RStudio


#1

I’m new to R and xgboost. Following the installation guide, I was able to build xgboost R for GPU. The installation is in ~/Users/my name/xgboost. How do I continue setting up to include the installation in the R win-library to run from R Studio, for example? Thank you.


#2

You should run

cmake --build . --target install --config Release

#3

Thank you for your reply. That was the last line of the code I ran from git bash.

Blockquote

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
mkdir build
cd build
cmake … -G"Visual Studio 15 2017 Win64" -DUSE_CUDA=ON -DR_LIB=ON -DLIBR_EXECUTABLE=“C:/Program Files/R/R-3.5.1/bin/x64/R.exe”
cmake --build . --target install --config Release

Blockquote

However, the xgboost file folder landed in “C:/Users/my name/xgboost” which I am unable to access from R Studio.


#4

Try running library(xgboost)?


#5

Doing so loads the CRAN cpu xgboost 0.82 version.


#6

Can you uninstall CRAN xgboost with remove.packages(xgboost)? Then re-install GPU XGBoost with cmake --build . --target install --config Release


#7

Same outcome. I’m not seeing any errors during the build, and the folder is in the location of the initial clone:
C:/Users/my name/xgboost

Running library(xgboost) results in “there is no package called xgboost” error.

Clearly, I’m not understanding the pathwways.


#8

Make sure your RStudio is referring to this R executable


#9

Does the xgboost folder need to be in C:/Program Files/R/?


#10

No, running install step should have already placed a package in the R directory.


#11

Ahh, thank you. That’s what’s missing. My git bash script must either be wrong or Visual Studio 17/cuda 9.2 not working as expected. Thank you for your help.


#12

Try using Developer Command Prompt when you run build and install steps with CMake