보다 오래 걸립니다 내가 오픈 CL 프로그램을 작성하고 난이OpenCL을 시작 엔드 프로파일 시간이 실제 지속 시간
Loop for MultipleGPU{
clEnqueueNDRangeKernel(commandQueues[i], kernel[i], 1, null,
global_work_size, local_work_size, 0, new cl_event[]{userEvent}, events[i]);
clFlush(commandQueues[i]);
}
long before = System.nanoTime();
// Set UserEvent = Complete so all kernel can start executing
clSetUserEventStatus(userEvent, CL_COMPLETE);
// Wait until the work is finished on all command queues
clWaitForEvents(events.length, events);
long after = System.nanoTime();
float totalDurationMs = (after - before)/1e6f;
...profiling each events with CL_PROFILING_COMMAND_START and CL_PROFILING_COMMAND_END...
처럼 내 커널이 UserEvent에이 보장 실행하는 동시에 커널 실행됩니다. 출처 : [Reima의 답변] : How do I know if the kernels are executing concurrently?. 프로필 시간 시작 엔드는 총 지속 시간보다 더 오래 걸렸다 이유
Total duration :37.800076ms
Duration on device 1 of 2: 38.037186
Duration on device 2 of 2: 37.85744
누군가가 나에게 설명 할 수 :
그리고 나는 2 테슬라 K20M GPU 하나의 시스템에서이 결과를 받고 있어요?
고맙습니다.