Add trace for kernel launches by umar456 · Pull Request #3143 · arrayfire/arrayfire · GitHub
Skip to content

Add trace for kernel launches#3143

Merged
umar456 merged 2 commits intoarrayfire:masterfrom
umar456:launch_trace
Jun 22, 2021
Merged

Add trace for kernel launches#3143
umar456 merged 2 commits intoarrayfire:masterfrom
umar456:launch_trace

Conversation

@umar456
Copy link
Copy Markdown
Member

@umar456 umar456 commented Jun 8, 2021

Add traces for kernel launches for OpenCL and CUDA. This will print kernel names for CUDA and OpenCL. It will print the launch configuration(blocks, threads) for CUDA

Description

  • Print the following trace for CUDA:
    [kernel][1623190555][731273] [ /data/devel/arrayfire/src/backend/cuda/kernel/random_engine.hpp:1064 ] Launching uniformPhilox: Blocks: [1] Threads: [256] Shared Memory: 0
  • Print the following trace for OpenCL
    [kernel][1623193966][746791] [ ../src/backend/opencl/Kernel.hpp:33 ] Launching philoxGenerator

Changes to Users

Users can filter these traces by setting the environment variable AF_TRACE to kernel

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

@umar456 umar456 requested a review from 9prady9 June 8, 2021 23:14
Copy link
Copy Markdown
Member

@9prady9 9prady9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

although i dislike std::string usage after i became aware of the issues it can potentially cause. we already kind of use it in many locations though.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is added in common interface target, dont we use common interface target with this static lib ?

. also it will fail when we looj for system/vcpkg provided spdlog target spdlog::spdlog_header_only -- perhaps I can handle this in my PR #3139

Comment thread src/backend/cuda/jit.cpp
@umar456 umar456 merged commit 9267ee7 into arrayfire:master Jun 22, 2021
@umar456 umar456 deleted the launch_trace branch June 22, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants