[tritonbench] A better way to encode input shapes with parameters
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 346
- PR merge metrics
- No merged PRs in 30d
Description
Right now developers need to manually specify the input shape metadata to generate the input tensors.
I am thinking if we could use decorators to make this process easier and more user-friendly.
Old style:
def get_input_iter(self) -> Generator:
shape_a = range(x, y)
shape_b = range(m, n)
for a in shape_a:
for b in shape_b:
yield generate_input(a, b)
New style:
@given(
a=st.integers(min_value=x, max_value=y),
b=st.integers(min_value=m, max_value=n),
)
def get_input(self, a, b):
return generate_input(a, b)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or an entry point. Start by locating tritonbench's input-shape metadata and tensor-generation code, then compare the current manual iterator flow with the proposed decorator-based interface. Done means developers can express parameterized input shapes without manually writing the nested iteration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100