Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:

jobs:
golang-ci:
if: github.repository == 'MiroMindAI/trace-blame'
runs-on: ubuntu-latest-m
steps:
- uses: actions/checkout@v4
Expand Down
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to trace-blame

Thank you for your interest in contributing to trace-blame!

## Getting Started

1. Fork the repository and clone your fork:
```bash
git clone https://github.com/<your-username>/trace-blame.git
cd trace-blame
```

2. Ensure you have Go 1.24+ installed (see `go.mod` for the exact version).

3. Fetch test data (symlinked from upstream HTA):
```bash
git clone --depth 1 --filter=blob:none --sparse \
https://github.com/facebookresearch/HolisticTraceAnalysis.git /tmp/hta
cd /tmp/hta && git sparse-checkout set tests/data
ln -sf /tmp/hta/tests ../trace-blame/tests
```

4. Build and verify:
```bash
go build -o trace-blame ./cmd/trace-blame/
go vet ./...
go test -timeout 20m ./...
```

## Making Changes

1. Create a feature branch from `main`:
```bash
git checkout -b my-feature main
```

2. Make your changes. Please follow these conventions:
- Write idiomatic Go — run `go vet` and `gofmt` before committing.
- Keep commits focused — one logical change per commit.
- Add or update tests for any new functionality.

3. Ensure all tests pass before opening a pull request.

## Pull Requests

- Open PRs against the `main` branch.
- Provide a clear title and description of what your change does and why.
- Link any related issues.
- CI runs automatically on PRs that touch Go source, module files, or the workflow itself.

## Reporting Issues

- Use [GitHub Issues](https://github.com/MiroMindAI/trace-blame/issues) to report bugs or request features.
- Include reproduction steps, expected behaviour, and actual behaviour.
- Attach trace files or error output when applicable.

## Code of Conduct

Be respectful and constructive. We follow the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).

## License

By contributing, you agree that your contributions will be licensed under the same license as the project (see [LICENSE](LICENSE)).
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A Go CLI for analyzing PyTorch Profiler traces.

Reimplements [HolisticTraceAnalysis](https://github.com/facebookresearch/HolisticTraceAnalysis) with following features:
Reimplements most of the workflows in [HolisticTraceAnalysis](https://github.com/facebookresearch/HolisticTraceAnalysis) with following features:

1. `install-skill` supports agent usage.
2. single go binary.
Expand Down Expand Up @@ -39,3 +39,20 @@ trace-blame idle-time-breakdown --db trace.db --ranks 0,1
| CUPTI | `cupti-counter-data` |

Run `trace-blame` with no arguments for usage, or `trace-blame <subcommand> -h` for flag details.

## Roadmap

- Expand debugging workflows beyond the current HTA coverage
- Navigate up and down the operator call stack from within the agent
- Traverse forward and backward along a CUDA stream in the agent
- Support memory-profiling workflows

Ideas and contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.

## Other Awesome Tools

Check out these tools to make debugging pytorch training job easier:

- [hta](https://github.com/facebookresearch/HolisticTraceAnalysis) analyzes torch profile.
- [tlparse](https://github.com/meta-pytorch/tlparse/) analyzes torch compile process.
- [mosaic](https://github.com/facebookresearch/mosaic) analyzes torch memory snapshot.