未验证 提交 a8905fbb 编写于 作者: W Wilber 提交者: GitHub

update yolobox from sync to async. test=develop (#3792)

上级 c57097ff
......@@ -185,15 +185,11 @@ void YoloBoxCompute::Run() {
anchors_.Resize({static_cast<int64_t>(anchors.size())});
int* d_anchors = anchors_.mutable_data<int>(TARGET(kCUDA));
// TargetWrapperCuda::MemcpyAsync(d_anchors,
// anchors.data(),
// sizeof(int) * anchors.size(),
// IoDirection::HtoD,
// stream);
CopySync<TARGET(kCUDA)>(d_anchors,
anchors.data(),
sizeof(int) * anchors.size(),
IoDirection::HtoD);
TargetWrapperCuda::MemcpyAsync(d_anchors,
anchors.data(),
sizeof(int) * anchors.size(),
IoDirection::HtoD,
stream);
int threads = 512;
int blocks = (n * box_num + threads - 1) / threads;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册