Skip to content

Inter-op and intra-op threading parameters in PyTorch #473

Description

@olcayc

Feature

Add APIs to set inter-op and intra-op threading parameters in PyTorch

Is your feature request related to a problem? Please describe.

Latency and throughput for CPU inference are affected by the number of inter-op and intra-op threads. See CPU Threading and Torchscript Inference for reference.

To get the best inference time performance, these parameters will need to be tuned for each model and physical host configuration. IIUC, Neuropods does not offer an API to set these parameters.

Describe the solution you'd like

Python APIs equivalent to those in pytorch, e.g.:

set_num_threads, get_num_threads
set_num_interop_threads, get_num_interop_threads

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions