You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
This pull request updates the project's URLs and references to reflect its new location under the `meta-pytorch` organization, and includes minor improvements and maintenance.
### Changes
- Updated all repository, documentation, and GitHub Pages links from `pytorch-labs` to `meta-pytorch` in:
- `README.md`
- `pyproject.toml`
- `.github/workflows/test.yml`
- `tritonparse/tools/decompress_bin_ndjson.py`
- `website/src/App.tsx`
- Updated `git clone`、`pip install`、GitHub Pages、Issues、Discussions links
- Added `.github/copilot-instructions.md` to provide project context for AI assistants.
- Minor `.gitignore` update(add `*.mdc`)。
- Minor formatting and comment corrections (e.g., in `decompress_bin_ndjson.py`).
Pull Request resolved: #52
Reviewed By: adamomainz
Differential Revision: D79746108
Pulled By: FindHao
fbshipit-source-id: 8cad84377bb5fd572a36c5b4d882652c274379b8
-**TritonParse** is a Python tool for visualizing and analyzing Triton kernel compilation and launch traces. It integrates tightly with Triton and PyTorch workflows, providing structured logging and IR comparison.
5
+
- The frontend is a React/Vite/TypeScript webapp (see `website/`), while the backend is Python (see `tritonparse/`).
6
+
7
+
## Key Components
8
+
-`tritonparse/structured_logging.py`: Core for logging kernel launches and compilation events, including stack traces and source mapping.
9
+
-`tritonparse/utils.py`: Main entry for parsing logs and generating output files (`.ndjson.gz`).
10
+
-`tritonparse/sourcemap_utils.py`: Utilities for stack trace analysis, session ID extraction, and source mapping.
11
+
-`tests/`: Contains both automated (unittest) and manual test scripts. See `tests/test_tritonparse.py` for main test suite.
12
+
-`website/`: Web UI for visualizing trace files. No backend server required; all processing is client-side.
-**Generate Traces**: Use `tritonparse.structured_logging.init()` in your Triton/PyTorch code, then run `tritonparse.utils.unified_parse()` to produce trace files.
17
+
-**Run Tests**: `python -m unittest tests.test_tritonparse -v` (see `tests/README.md` for details)
18
+
-**Manual Test**: `python tests/test_add.py` (generates logs and parses them)
19
+
-**CI Scripts**: Use `.ci/*.sh` for environment setup, Triton install, and test runs. See `.ci/README.md` for workflow.
20
+
21
+
## Patterns & Conventions
22
+
-**Session ID Extraction**: Session IDs for autotune are derived from stack traces (see `get_autotune_session_id` in `sourcemap_utils.py`). The logic may need to distinguish user code from framework/runtime code.
23
+
-**Test Isolation**: Each test defines its own kernel to avoid cache interference. CUDA tests are skipped if no GPU is available.
24
+
-**Log Output**: All logs and parsed outputs are written to `tests/parsed_output/` or user-specified directories.
25
+
-**Environment Variables**: Commonly used for controlling debug, cache, and device selection (e.g., `TRITONPARSE_DEBUG=1`, `TORCHINDUCTOR_FX_GRAPH_CACHE=0`).
26
+
27
+
## Integration Points
28
+
-**Triton**: Must be installed from source for full feature support. See `pyproject.toml` and README for details.
29
+
-**PyTorch**: Used in tests and example kernels.
30
+
-**Web UI**: Consumes `.ndjson.gz` trace files for visualization. No server required.
31
+
32
+
## Troubleshooting
33
+
- If logs are missing, check Triton installation and ensure logging is enabled.
34
+
- For test failures, verify CUDA availability and correct environment setup.
35
+
- Use debug mode (`TRITONPARSE_DEBUG=1`) for verbose output.
36
+
37
+
## References
38
+
- See `README.md` (project root) for quick start, features, and documentation links.
39
+
- See `tests/README.md` for test structure and commands.
40
+
- See `.ci/README.md` for CI and environment setup scripts.
41
+
42
+
---
43
+
44
+
**For new agents:**
45
+
- Always check for the latest conventions in the above files before making changes.
46
+
- Prefer using provided utility functions and logging mechanisms over custom implementations.
47
+
- When analyzing stack traces or session IDs, refer to `sourcemap_utils.py` and related test cases for expected patterns.
Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -50,11 +50,11 @@ jobs:
50
50
51
51
- name: Check code formatting
52
52
run: |
53
-
make format-check || (echo "❌ Format check failed. Please run 'make format' to fix formatting issues, then commit the changes." && echo "📖 For detailed formatting guide, see: https://github.com/pytorch-labs/tritonparse/wiki/05.-Code-Formatting" && exit 1)
53
+
make format-check || (echo "❌ Format check failed. Please run 'make format' to fix formatting issues, then commit the changes." && echo "📖 For detailed formatting guide, see: https://github.com/meta-pytorch/tritonparse/wiki/05.-Code-Formatting" && exit 1)
54
54
55
55
- name: Check linting
56
56
run: |
57
-
make lint-check || (echo "❌ Linting failed. Please run 'make format' to fix formatting issues, then commit the changes." && echo "📖 For detailed formatting guide, see: https://github.com/pytorch-labs/tritonparse/wiki/05.-Code-Formatting" && exit 1)
57
+
make lint-check || (echo "❌ Linting failed. Please run 'make format' to fix formatting issues, then commit the changes." && echo "📖 For detailed formatting guide, see: https://github.com/meta-pytorch/tritonparse/wiki/05.-Code-Formatting" && exit 1)
**A comprehensive visualization and analysis tool for Triton IR files** — helping developers analyze, debug, and understand Triton kernel compilation processes.
7
7
8
-
🌐 **[Try it online →](https://pytorch-labs.github.io/tritonparse/?json_url=https://pytorch-labs.github.io/tritonparse/dedicated_log_triton_trace_findhao__mapped.ndjson.gz)**
8
+
🌐 **[Try it online →](https://meta-pytorch.org/tritonparse/?json_url=https://meta-pytorch.org/tritonparse/dedicated_log_triton_trace_findhao__mapped.ndjson.gz)**
9
9
10
10
## ✨ Key Features
11
11
@@ -56,15 +56,15 @@ INFO:tritonparse:Copying parsed logs from /tmp/tmp1gan7zky to /scratch/findhao/t
56
56
57
57
### 2. Visualize Results
58
58
59
-
**Visit [https://pytorch-labs.github.io/tritonparse/](https://pytorch-labs.github.io/tritonparse/?json_url=https://pytorch-labs.github.io/tritonparse/dedicated_log_triton_trace_findhao__mapped.ndjson.gz)** and open your local trace files (.ndjson.gz format).
59
+
**Visit [https://meta-pytorch.org/tritonparse/](https://meta-pytorch.org/tritonparse/?json_url=https://meta-pytorch.org/tritonparse/dedicated_log_triton_trace_findhao__mapped.ndjson.gz)** and open your local trace files (.ndjson.gz format).
60
60
61
61
> **🔒 Privacy Note**: Your trace files are processed entirely in your browser - nothing is uploaded to any server!
This project is licensed under the BSD-3 License - see the [LICENSE](LICENSE) file for details.
121
121
122
122
---
123
123
124
-
**✨ Ready to get started?** Visit our **[Installation Guide](https://github.com/pytorch-labs/tritonparse/wiki/01.-Installation)** or try the **[online tool](https://pytorch-labs.github.io/tritonparse/)** directly!
124
+
**✨ Ready to get started?** Visit our **[Installation Guide](https://github.com/meta-pytorch/tritonparse/wiki/01.-Installation)** or try the **[online tool](https://meta-pytorch.org/tritonparse/)** directly!
0 commit comments