diff --git a/src/core/impl/comp_node/cuda/comp_node.cpp b/src/core/impl/comp_node/cuda/comp_node.cpp index b12e8167e9fee7079d5ae9a1914430e17b586711..31aa33f70ae78318b22ec80ab67f490adefa0c12 100644 --- a/src/core/impl/comp_node/cuda/comp_node.cpp +++ b/src/core/impl/comp_node/cuda/comp_node.cpp @@ -423,9 +423,8 @@ void CudaCompNodeImpl::free_device(void *ptr) { } void* CudaCompNodeImpl::alloc_host(size_t size) { - // no need for activate() here because under - // unified addressing, host memory can be accessed - // and freed on any device + // need activate because it create cuda cuda context in current device + activate(); return sd->host_alloc->alloc(size); }