Skip to content

Provide a context manager for running distributed code on a given process first #2923

@vfdev-5

Description

@vfdev-5

🚀 Feature

import ignite.distibuted as idist

with idist.rank_process_first(rank=1):
    data_setup_code(...)

where behind we would be doing something like:

    if idist.get_local_rank() != rank:
        idist.barrier()

    data_setup_code(...)

    if idist.get_local_rank() == rank:
        idist.barrier()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions