Skip to content

Conversation

@FindHao
Copy link
Member

@FindHao FindHao commented Dec 1, 2025

Summary

This PR changes the --line argument in the reproduce command from 1-based to 0-based indexing, aligning with Python conventions.

Changes

  • reproducer/cli.py: Changed --line default from 1 to 0, updated help text to indicate 0-based indexing
  • cli.py: Removed the -1 conversion, updated CLI example to use --line 1
  • README.md: Updated example with explanation that line 0 is compilation event, line 1 is first launch event
  • reproducer/templates/tritonbench.py: Fixed import order (lint fix)
  • Makefile: Added -U flag to pip install (minor fix)

Breaking Change

The --line argument is now 0-based instead of 1-based:

  • --line 0 = first event (compilation)
  • --line 1 = second event (first launch)

Users who previously used --line 1 to get the first event should now use --line 0.

Testing

Existing test_reproducer_end_to_end test already uses 0-based line_index internally, no test changes needed.

BREAKING CHANGE: The --line argument is now 0-based instead of 1-based.
- --line 0 now refers to the first event (previously --line 1)
- Default value changed from 1 to 0
- Removed the -1 conversion in cli.py

This aligns with Python's 0-based indexing convention.

Also includes:
- Fix import order in tritonbench template
- Update pip install to use -U flag in Makefile
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 1, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 1, 2025

@FindHao has imported this pull request. If you are a Meta employee, you can view this in D88082318.

@meta-codesync
Copy link

meta-codesync bot commented Dec 1, 2025

@FindHao merged this pull request in 02ad902.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants