mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-05 00:14:54 +08:00
[Vulkan + Profiler] Enable Processing Vulkan Events in Profiler (#90852)
@bypass-github-export-checks This diff enables passing processing events in the profiler. Passing the events from QueryPool, and making sure vulkan events align with parent CPU events correctly will be handled later in this diff stack. This diff was made by forking Taylor's scaffolding diff, D39779878, with a few changes: - Rebasing + resolving merge conflicts - Fixing (i.e. removing) auto import of profiler/containers.h - Changing the activity type to CPU_OP which makes the vulkan events appear on chrometrace - Moving timestamp adjustment scaffolding to D39893109 Differential Revision: [D39834805](https://our.internmc.facebook.com/intern/diff/D39834805/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/90852 Approved by: https://github.com/mcr229
This commit is contained in:
committed by
PyTorch MergeBot
parent
7badd0b9e6
commit
193068cbcf
@ -132,6 +132,7 @@ void initPythonBindings(PyObject* module) {
|
||||
py::enum_<EventType>(m, "_EventType")
|
||||
.value("TorchOp", EventType::TorchOp)
|
||||
.value("Backend", EventType::Backend)
|
||||
.value("Vulkan", EventType::Vulkan)
|
||||
.value("Allocation", EventType::Allocation)
|
||||
.value("PyCall", EventType::PyCall)
|
||||
.value("PyCCall", EventType::PyCCall)
|
||||
@ -185,6 +186,7 @@ void initPythonBindings(PyObject* module) {
|
||||
.def_readonly("allow_tf32_cublas", &torch_op_t::allow_tf32_cublas_);
|
||||
|
||||
py::class_<ExtraFields<EventType::Backend>>(m, "_ExtraFields_Backend");
|
||||
py::class_<ExtraFields<EventType::Vulkan>>(m, "_ExtraFields_Vulkan");
|
||||
|
||||
using allocation_t = ExtraFields<EventType::Allocation>;
|
||||
py::class_<allocation_t>(m, "_ExtraFields_Allocation")
|
||||
|
||||
Reference in New Issue
Block a user