dmlc / dmlc/xgboost

Exception when cleaning up ThreadLocalStore learner when using Cuda

Open
#9,751 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

Using VS 17.5.3 and the C API with branch release_2.0.0

Creating a "worker thread" to fit a model using XGBoosterUpdateOneIter() and using the option `XGBoosterSetParam(booster, "device", "cuda");`. When worker thread exits, I get a dmlc::Error exception with this call stack:

```
xgboost.dll!dmlc::LogMessageFatal::~LogMessageFatal() Line 428 C++
xgboost.dll!dh::ThrowOnCudaError(enum cudaError,char const *,int) C++
xgboost.dll!xgboost::HostDeviceVectorImpl::SetDevice(void) C++
xgboost.dll!xgboost::HostDeviceVectorImpl::`scalar deleting destructor'(unsigned int) C++
xgboost.dll!xgboost::HostDeviceVector::~HostDeviceVector(void) C++
xgboost.dll!xgboost::XGBAPIThreadLocalEntry::~XGBAPIThreadLocalEntry() C++
xgboost.dll!std::_Tree_val>>::_Erase_tree,void *>>>(std::allocator,void *>> & _Al, std::_Tree_node,void *> * _Rootnode) Line 747 C++
[Inline Frame] xgboost.dll!std::_Tree_val>>::_Erase_head(std::allocator,void *>> &) Line 754 C++
[Inline Frame] xgboost.dll!std::_Tree,std::allocator>,0>>::{dtor}() Line 1081 C++
xgboost.dll!`dmlc::ThreadLocalStore,std::allocator>>>::Get'::`2'::`dynamic atexit destructor for 'inst''() C++
xgboost.dll!__dyn_tls_dtor(void * __formal, const unsigned long dwReason, void * __formal) Line 119 C++
```

I do not get this exception when I use the cpu device version.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.