Skip to content

Commit

Permalink
Fix initial-release nvcc v10.1 issue with thread_local.h (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
DickJC123 authored and tqchen committed Nov 5, 2019
1 parent 05fb5ad commit ca9f932
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/dmlc/thread_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class ThreadLocalStore {
static MX_THREAD_LOCAL T* ptr = nullptr;
if (ptr == nullptr) {
ptr = new T();
Singleton()->RegisterDelete(ptr);
// Syntactic work-around for the nvcc of the initial cuda v10.1 release,
// which fails to compile 'Singleton()->' below. Fixed in v10.1 update 1.
(*Singleton()).RegisterDelete(ptr);
}
return ptr;
#endif
Expand Down

0 comments on commit ca9f932

Please sign in to comment.