Skip to content

VizTracer --log_torch triggers an error and segfault on exit when used in conjunction with PyTorch profiler and the multiprocessing mode of DataLoader, where kineto_results is None. #632

@PEKEW

Description

@PEKEW

When using VizTracer's --log_torch feature to sample PyTorch code (DataLoader with multiple workers and large HDF5 files (60GB+) ), the program attempts to export the torch profiler trace on exit, resulting in an AttributeError / RuntimeError. Ultimately, the process segfaults and exits. It appears that VizTracer fails to robustly handle the scenario where the profiler does not properly generate kineto results (with kineto_results being None) upon exit.

The program throws an AttributeError / RuntimeError on exit, and eventually crashes with a segmentation fault (core dumped).

OS: ubuntu 22.04
Python :3.10.19
PyTorch : '2.9.0+cu130'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions