Skip to content

pytorch.profiler cannot profile aten:mm on GPU #799

@scse-l

Description

@scse-l

I use pytorch.profiler to profile a program of matmul on GPU, it seems profiler does not record aten.mm correctly. There is stats in GPU kernel View,

image

but no GPU kernel stats in Trace view.

image

Sample code:

import torch
a = torch.rand([1, 1024, 2048], device='cuda')
b = torch.rand([2048, 2048], device='cuda')
with torch.profiler.profile(
    activities=[
        torch.profiler.ProfilerActivity.CPU,
        torch.profiler.ProfilerActivity.CUDA,
    ],
    on_trace_ready=torch.profiler.tensorboard_trace_handler("./mm-profile")
):
    torch.matmul(a, b)

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginPyTorch Profiler TensorBoard Plugin relatedquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions