pytorch / pytorch/kineto

Enable Kineto CUPTI on Windows

Open
#356 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
992
Forks
270
Avg merge
2d 11h
Merged PRs (30d)
12

Description

Some chats from slack

me:

@Gisle Dankel Do you have the context of why static linking is required on windows for libkineto?

Gisle:

It’s not - in fact I don’t think static linking is an option on windows? We prefer to link statically because libcupti is not always installed on the system

me:

I am starting to see the reason behind it after exploring my pytorch installation in C:\Users\guangyunhan\Miniconda3\envs\py37\lib\site-packages\torch. On windows, all CUDA related DLLs are installed int o <...>\site-packages\torch\lib\ , that means those libraries are packaged with whl file, therefore, a 3GB whl for user, but it is convenient.

This explains why

libcupti is not always installed on the system

And by

We prefer to link statically

If I take it right, if we want to be the same convenient as above, we need to provide cupti library to user. Statically linking cupti into main pytorch/libkineto DLL is an option.

Unfortunately, NV only provide us some DLLs under C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\extras\CUPTI\lib64 , so the only viable option is to package cupti library into whl

In summary:
on windows

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Windows CUPTI context in this issue and the referenced PyTorch pull request 62175. Check how CUPTI DLL packaging and the existing Windows activity-timestamp fix relate to enabling CUPTI, then verify that Windows profiling can use CUPTI and that the completed checklist items remain valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.