Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --op-collection option #2503

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add --op-collection option #2503

wants to merge 3 commits into from

Conversation

FindHao
Copy link
Member

@FindHao FindHao commented Oct 10, 2024

This PR add --op-collection to tritonbench. It can run multiple ops in defined operator collections. The default collection includes all ops not included in other collections.

Operator collections are defined in torchbenchmark/operators/__init__.py

@@ -40,8 +59,16 @@ def _list_opbench_paths() -> List[str]:
return opbench


def list_operators() -> List[str]:
def list_operators(op_collection: OP_COLLECTION = OP_COLLECTION.DEFAULT) -> List[str]:
Copy link
Member Author

@FindHao FindHao Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xuzhao9 maybe we should use List(str) as the argument?

userbenchmark/triton/run.py Outdated Show resolved Hide resolved
@xuzhao9
Copy link
Contributor

xuzhao9 commented Oct 10, 2024

I am thinking we should have a clearer place to manage operator collection. Can we create a new directory torchbenchmark/operator_collection and place each operator collection there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants