提交 e8571cca 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

fix(mgb/cuda): fix cuda host alloc set device

GitOrigin-RevId: f4756e8981bad8ae8ff595cbf98f3e50caaf18e9
上级 f7b5eced
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册