未验证 提交 8293f21a 编写于 作者: W wangchaochaohu 提交者: GitHub

Profile refine (#21258)

* fix profile api high version test=develop
上级 67c836fb
......@@ -185,8 +185,13 @@ void CUPTIAPI bufferCompleted(CUcontext ctx, uint32_t streamId, uint8_t *buffer,
switch (record->kind) {
case CUPTI_ACTIVITY_KIND_KERNEL:
case CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL: {
#if CUDA_VERSION >= 9000
auto *kernel =
reinterpret_cast<const CUpti_ActivityKernel4 *>(record);
#else
auto *kernel =
reinterpret_cast<const CUpti_ActivityKernel3 *>(record);
#endif
tracer->AddKernelRecords(kernel->name, kernel->start, kernel->end,
kernel->deviceId, kernel->streamId,
kernel->correlationId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册