SharpLearning icon indicating copy to clipboard operation
SharpLearning copied to clipboard

SEHException when using xgboost with gpu

Open gaop123 opened this issue 7 years ago • 2 comments

I have installed latest Cuda version (9.2), and when setting the tree method to GPU* i get an SEHException "external component has thrown an exception", should i compile the program in a certain way after cuda installation? What should i do?, thanks!

gaop123 avatar Sep 06 '18 08:09 gaop123

Hi @gaop123 ,

It could sound like a GPU memory issue. There are no special compilation needed once you have installed Cuda like descriped in the guide: Cuda installation.

Could you provide some details about the following:

  • Settings of the xgboost learner (code)
  • How large is the problem you are training on (number of rows, cols)
  • If possible, detailed description from the SEHException

Best regards Mads

mdabros avatar Sep 07 '18 05:09 mdabros

I don't think it's a memory related issue, i have tried on some small data sets (about 500 rows and 100 cols) just to check but the exception is still thrown,

this is the code of the learning part:

       var sharpDtLearner = new

ClassificationXGBoostLearner(3,0.1,100,false,ClassificationObjective.GPUBinaryLogistic); var sut = sharpDtLearner.Learn(mat, outputs.Convert(x => (double)x));

      ProbabilityPrediction[] pp = this.xgboost.PredictProbability(mat);

this is then exception:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception. at XGBoost.lib.XGBOOST_NATIVE_METHODS.XGBoosterUpdateOneIter(IntPtr bHandle, Int32 iter, IntPtr dHandle) at XGBoost.lib.Booster.Update(DMatrix train, Int32 iter) at SharpLearning.XGBoost.Learners.ClassificationXGBoostLearner.Learn(F64Matrix observations, Double[] targets, Int32[] indices)

*if i change the objective to BinaryLogistic i't works perfectly. Thanks!

‫בתאריך יום ו׳, 7 בספט׳ 2018 ב-8:33 מאת ‪Mads Dabros‬‏ <‪ [email protected]‬‏>:‬

Hi @gaop123 https://github.com/gaop123 ,

It could sound like a GPU memory issue. There are no special compilation needed once you have installed Cuda like descriped in the guide: Cuda installation https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html .

Could you provide some details about the following:

  • Settings of the xgboost learner (code)
  • How large is the problem you are training on (number of rows, cols)
  • If possible, detailed description from the SEHException

Best regards Mads

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mdabros/SharpLearning/issues/87#issuecomment-419327894, or mute the thread https://github.com/notifications/unsubscribe-auth/ANFWWW1K_hzG1exi6VOvr8h1GSZppSGsks5uYgVAgaJpZM4WcdTN .

-- חיימוביץ גיא

gaop123 avatar Sep 07 '18 11:09 gaop123