[Profiler][PrivateUse1] Profiler support PrivateUse1 key (#120556)

Summary:
1.Package public headers of kineto if USE_KINETO so that they can be used by PrivateUse1 user.
2.Add PrivateUse1 key to ActivityType.
3. Support PrivateUse1 key in function deviceTypeFromActivity and _supported_activities.
4. Fix some bugs when processing profiler results.
Co-authored-by: albanD <desmaison.alban@gmail.com>
Co-authored-by: Aaron Shi <enye.shi@gmail.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120556
Approved by: https://github.com/aaronenyeshi
This commit is contained in:
Florian
2024-04-12 14:28:19 +00:00
committed by PyTorch MergeBot
parent 6f4c7eeb08
commit 41613a0803
9 changed files with 61 additions and 11 deletions

View File

@ -1386,6 +1386,12 @@ def main():
"include/tensorpipe/transport/uv/*.h",
]
)
if get_cmake_cache_vars()["USE_KINETO"]:
torch_package_data.extend(
[
"include/kineto/*.h",
]
)
torchgen_package_data = [
# Recursive glob doesn't work in setup.py,
# https://github.com/pypa/setuptools/issues/1806