我尝试分析我的功能在设备上的执行时间。我读了这个链接: https : //docs.oneapi.com/versions/latest/dpcpp/iface/event.html 但我没有在文档中找到任何关于 sycl::info::event_profiling 的信息,这让我理解它们完全对应的是什么。我的意思是,command_start、command_end、command_submit。例如:这是我的代码的一部分,内核,
auto event = gpuQueue.submit([&](sycl::handler &h) {
//local copy of fun
auto f = fun;
sycl::accessor in_accessor(in_buffer, h, sycl::read_only);
sycl::accessor out_accessor(out_buffer, h, sycl::write_only);
h.parallel_for(n_item, [=](sycl::id<1> index) {
out_accessor[index] = f(in_accessor[index]);
});
});
event.wait();
auto end_overall = std::chrono::system_clock::now();
cl_ulong submit_time = event.template get_profiling_info<
cl::sycl::info::event_profiling::command_submit>();
cl_ulong start_time = event.template get_profiling_info<
cl::sycl::info::event_profiling::command_start>();
cl_ulong end_time = event.template get_profiling_info<
cl::sycl::info::event_profiling::command_end>();
我想了解 cl::sycl::info::event_profiling::command_submit,提交整个代码还是只提交并行?