Skip to content

Feature request: a handy way of getting what operators are being used in TorchBench models #921

@zou3519

Description

@zou3519

Not sure if this feature should go here or elsewhere, but here it is:

As a library implementor, one question I have is, "what is the set of operations I need to add support for for my feature to get good coverage on torchbench models"?

We actually already have the mechanism to do this. Thanks to @ezyang's work on torch_function mode, we're able to, given a model, get out a list of PyTorch python APIs the model uses. @samdow's work on torch_dispatch mode lets us, given a model, get out a list of aten operators that the model uses.

Every time I want to do this, I have to:

  1. figure out how to install torchbench (and debug installation issues of the packages)
  2. write a script using the above mentioned mechanisms to do this

It would be cool if we autogenerated a list of operations used by the models and shoved them somewhere. Perhaps this is in scope for Operator HUD? https://docs.google.com/document/d/1esIWMJfy7behsupRxGVr4KEXNP0SRYS9pPoZbtqiXGA/edit

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