tritonparse 0.3.1.dev20251018071448__tar.gz → 0.3.3.dev20251231071619__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. tritonparse-0.3.3.dev20251231071619/.github/scripts/check_new_commits.sh +122 -0
  2. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.github/workflows/nightly-pypi.yml +13 -5
  3. tritonparse-0.3.3.dev20251231071619/.github/workflows/website-build.yml +63 -0
  4. tritonparse-0.3.3.dev20251231071619/CHANGELOG.md +26 -0
  5. tritonparse-0.3.3.dev20251231071619/Makefile +86 -0
  6. {tritonparse-0.3.1.dev20251018071448/tritonparse.egg-info → tritonparse-0.3.3.dev20251231071619}/PKG-INFO +18 -8
  7. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/README.md +17 -7
  8. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/test_add.py +2 -3
  9. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/test_tritonparse.py +541 -8
  10. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/__main__.py +2 -0
  11. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/cli.py +45 -6
  12. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/context_manager.py +5 -4
  13. tritonparse-0.3.3.dev20251231071619/tritonparse/info/__init__.py +30 -0
  14. tritonparse-0.3.3.dev20251231071619/tritonparse/info/cli.py +262 -0
  15. tritonparse-0.3.3.dev20251231071619/tritonparse/info/kernel_query.py +209 -0
  16. tritonparse-0.3.3.dev20251231071619/tritonparse/info/parse_helper.py +70 -0
  17. tritonparse-0.3.3.dev20251231071619/tritonparse/parse/__init__.py +66 -0
  18. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/common.py +7 -10
  19. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/event_diff.py +2 -0
  20. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/extract_source_mappings.py +3 -3
  21. tritonparse-0.3.3.dev20251231071619/tritonparse/parse/ir_analysis.py +684 -0
  22. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/ir_parser.py +150 -4
  23. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/mapper.py +4 -2
  24. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/sourcemap_utils.py +25 -0
  25. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/trace_processor.py +54 -20
  26. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/utils.py +13 -1
  27. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/ast_analyzer.py +636 -0
  28. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/cli.py +29 -3
  29. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/consolidated_result.py +52 -0
  30. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/function_extractor.py +228 -0
  31. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/import_info.py +25 -0
  32. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/import_parser.py +178 -0
  33. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/import_resolver.py +152 -0
  34. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/ingestion/ndjson.py +4 -2
  35. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/multi_file_analyzer.py +825 -0
  36. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/orchestrator.py +40 -7
  37. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/placeholder_replacer.py +132 -24
  38. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/templates/example.py +38 -0
  39. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/templates/loader.py +2 -0
  40. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/templates/tritonbench.py +106 -0
  41. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/templates/utils.py +48 -0
  42. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/artifacts/__init__.py +5 -0
  43. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/artifacts/triton_fused_kernel.py +65 -0
  44. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/artifacts/triton_preprocess.py +16 -0
  45. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/artifacts/triton_utils.py +14 -0
  46. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/test_import_parser.py +164 -0
  47. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/test_import_resolver.py +88 -0
  48. tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests/test_multi_file_analyzer.py +118 -0
  49. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/types.py +2 -0
  50. tritonparse-0.3.1.dev20251018071448/tritonparse/reproducer/templates/example.py → tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/utils.py +279 -89
  51. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/shared_vars.py +7 -0
  52. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/structured_logging.py +102 -9
  53. tritonparse-0.3.3.dev20251231071619/tritonparse/tools/__init__.py +0 -0
  54. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/tools/decompress_bin_ndjson.py +2 -0
  55. tritonparse-0.3.3.dev20251231071619/tritonparse/tools/extract_irs.py +244 -0
  56. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/tools/format_fix.py +2 -0
  57. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/tools/load_tensor.py +2 -0
  58. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/tools/prettify_ndjson.py +18 -1
  59. tritonparse-0.3.3.dev20251231071619/tritonparse/tools/readme.md +37 -0
  60. tritonparse-0.3.3.dev20251231071619/tritonparse/tp_logger.py +46 -0
  61. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619/tritonparse.egg-info}/PKG-INFO +18 -8
  62. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse.egg-info/SOURCES.txt +42 -11
  63. tritonparse-0.3.3.dev20251231071619/website/index.html +24 -0
  64. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/package-lock.json +727 -977
  65. tritonparse-0.3.3.dev20251231071619/website/package.json +43 -0
  66. tritonparse-0.3.3.dev20251231071619/website/scripts/update_deps.sh +53 -0
  67. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/App.tsx +50 -62
  68. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/ArgumentViewer.tsx +31 -32
  69. tritonparse-0.3.3.dev20251231071619/website/src/components/CodeComparisonView.tsx +575 -0
  70. tritonparse-0.3.3.dev20251231071619/website/src/components/CodeViewer.css +95 -0
  71. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/CodeViewer.tsx +214 -79
  72. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/CompilationInfo.tsx +1 -1
  73. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/CopyCodeButton.tsx +3 -9
  74. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/DataSourceSelector.tsx +24 -29
  75. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/DiffComparisonView.tsx +87 -43
  76. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/DiffViewer.tsx +32 -12
  77. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/SingleCodeViewer.tsx +6 -17
  78. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/StackDiffViewer.tsx +45 -14
  79. tritonparse-0.3.3.dev20251231071619/website/src/components/TritonIRs.tsx +45 -0
  80. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/WelcomeScreen.tsx +4 -51
  81. tritonparse-0.3.3.dev20251231071619/website/src/components/icons/GitHubIcon.tsx +11 -0
  82. tritonparse-0.3.3.dev20251231071619/website/src/components/icons/index.ts +25 -0
  83. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/context/FileDiffSession.tsx +1 -0
  84. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/pages/CodeView.tsx +102 -106
  85. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/pages/FileDiffView.tsx +54 -27
  86. tritonparse-0.3.3.dev20251231071619/website/src/pages/IRAnalysis.tsx +291 -0
  87. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/pages/KernelOverview.tsx +27 -41
  88. tritonparse-0.3.3.dev20251231071619/website/src/types/global.d.ts +14 -0
  89. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/utils/dataLoader.ts +75 -15
  90. tritonparse-0.3.3.dev20251231071619/website/src/utils/irLanguage.ts +30 -0
  91. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/utils/tensor.ts +13 -7
  92. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/vite-env.d.ts +4 -0
  93. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/vite.config.ts +12 -1
  94. tritonparse-0.3.1.dev20251018071448/CHANGELOG.md +0 -308
  95. tritonparse-0.3.1.dev20251018071448/Makefile +0 -58
  96. tritonparse-0.3.1.dev20251018071448/tritonparse/reproducer/utils.py +0 -365
  97. tritonparse-0.3.1.dev20251018071448/tritonparse/tools/readme.md +0 -1
  98. tritonparse-0.3.1.dev20251018071448/tritonparse/tp_logger.py +0 -9
  99. tritonparse-0.3.1.dev20251018071448/website/index.html +0 -14
  100. tritonparse-0.3.1.dev20251018071448/website/package.json +0 -46
  101. tritonparse-0.3.1.dev20251018071448/website/src/components/CodeComparisonView.tsx +0 -419
  102. tritonparse-0.3.1.dev20251018071448/website/src/components/TritonIRs.tsx +0 -94
  103. tritonparse-0.3.1.dev20251018071448/website/src/utils/fbDetection.ts +0 -22
  104. tritonparse-0.3.1.dev20251018071448/website/src/utils/safeImport.ts +0 -29
  105. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.ci/README.md +0 -0
  106. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.ci/install-project.sh +0 -0
  107. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.ci/install-triton.sh +0 -0
  108. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.ci/run-tests.sh +0 -0
  109. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.ci/setup.sh +0 -0
  110. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.github/PAGES_SETUP.md +0 -0
  111. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.github/workflows/deploy-pages-standalone.yml +0 -0
  112. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.github/workflows/deploy-pages.yml +0 -0
  113. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.github/workflows/test.yml +0 -0
  114. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/.gitignore +0 -0
  115. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/CODE_OF_CONDUCT.md +0 -0
  116. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/CONTRIBUTING.md +0 -0
  117. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/LICENSE +0 -0
  118. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/__init__.py +0 -0
  119. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/pyproject.toml +0 -0
  120. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/run.py +0 -0
  121. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/setup.cfg +0 -0
  122. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/README.md +0 -0
  123. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/__init__.py +0 -0
  124. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/logs/dedicated_log_triton_trace_findhao_.ndjson +0 -0
  125. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/parsed_output/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
  126. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/parsed_output/f0_fc0_a0_cai-.ndjson.gz +0 -0
  127. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/parsed_output/log_file_list.json +0 -0
  128. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/parsed_output_complex/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
  129. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tests/example_output/parsed_output_complex/log_file_list.json +0 -0
  130. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/__init__.py +0 -0
  131. {tritonparse-0.3.1.dev20251018071448/tritonparse → tritonparse-0.3.3.dev20251231071619/tritonparse/parse}/source_type.py +0 -0
  132. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/__init__.py +0 -0
  133. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/reproducer/templates/__init__.py +0 -0
  134. {tritonparse-0.3.1.dev20251018071448/tritonparse/tools → tritonparse-0.3.3.dev20251231071619/tritonparse/reproducer/tests}/__init__.py +0 -0
  135. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse/tools/disasm.py +0 -0
  136. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse.egg-info/dependency_links.txt +0 -0
  137. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse.egg-info/entry_points.txt +0 -0
  138. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse.egg-info/requires.txt +0 -0
  139. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/tritonparse.egg-info/top_level.txt +0 -0
  140. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/eslint.config.js +0 -0
  141. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/public/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
  142. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/public/f0_fc0_a0_cai-.ndjson +0 -0
  143. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/public/favicon.ico +0 -0
  144. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/public/logo.svg +0 -0
  145. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/scripts/inline-html.js +0 -0
  146. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/App.css +0 -0
  147. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/assets/react.svg +0 -0
  148. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/Callstack.tsx +0 -0
  149. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/ExternalLink.tsx +0 -0
  150. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/components/ToggleSwitch.tsx +0 -0
  151. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/index.css +0 -0
  152. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/src/main.tsx +0 -0
  153. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/tsconfig.app.json +0 -0
  154. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/tsconfig.json +0 -0
  155. {tritonparse-0.3.1.dev20251018071448 → tritonparse-0.3.3.dev20251231071619}/website/tsconfig.node.json +0 -0
@@ -0,0 +1,122 @@
1
+ #!/bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # Check if there are new commits since the last nightly PyPI release.
4
+ # This script is used by nightly-pypi.yml to implement on-demand nightly publishing.
5
+ #
6
+ # Exit code:
7
+ # Always exits with 0 (success). The publish decision is communicated via GITHUB_OUTPUT.
8
+ #
9
+ # Output:
10
+ # Sets GITHUB_OUTPUT variable: should_publish=true/false
11
+ # - true: New commits found or check skipped due to errors (fail-open behavior)
12
+ # - false: No new commits since last nightly release
13
+
14
+ set -o pipefail
15
+ # Note: set -e is intentionally not used to allow explicit error handling.
16
+ # The script implements fail-open behavior where errors should not block publishing.
17
+
18
+ # Configuration
19
+ MAX_RETRIES=3
20
+ RETRY_DELAY=5
21
+ CURL_TIMEOUT=10
22
+ PACKAGE_NAME="${PACKAGE_NAME:-tritonparse}"
23
+ PACKAGE_PATH="${PACKAGE_PATH:-}" # Optional: subdirectory to check (e.g., "python/")
24
+
25
+ # Dependencies: This script requires 'jq' and 'curl' to be installed.
26
+ # These are pre-installed on ubuntu-latest GitHub Actions runners.
27
+
28
+ # Function: Fetch latest nightly version from PyPI with retry
29
+ fetch_latest_nightly() {
30
+ local retries=0
31
+
32
+ while [ $retries -lt $MAX_RETRIES ]; do
33
+ local response
34
+ response=$(curl -s --max-time $CURL_TIMEOUT \
35
+ "https://pypi.org/pypi/${PACKAGE_NAME}/json" 2>/dev/null)
36
+ local curl_exit=$?
37
+
38
+ if [ $curl_exit -eq 0 ] && [ -n "$response" ]; then
39
+ # Try to parse and extract latest dev version
40
+ local latest
41
+ latest=$(echo "$response" | \
42
+ jq -r '.releases | keys[] | select(contains(".dev"))' 2>/dev/null | \
43
+ sort -V | tail -1)
44
+ local jq_exit=$?
45
+
46
+ if [ $jq_exit -eq 0 ] && [ -n "$latest" ]; then
47
+ echo "$latest"
48
+ return 0
49
+ fi
50
+ fi
51
+
52
+ retries=$((retries + 1))
53
+ echo "::warning::PyPI API request failed (attempt $retries/$MAX_RETRIES)"
54
+
55
+ if [ $retries -lt $MAX_RETRIES ]; then
56
+ echo "Retrying in ${RETRY_DELAY}s..."
57
+ sleep $RETRY_DELAY
58
+ fi
59
+ done
60
+
61
+ echo "::warning::All $MAX_RETRIES attempts failed"
62
+ return 1
63
+ }
64
+
65
+ main() {
66
+ echo "Checking for new commits since last nightly release..."
67
+
68
+ # Step 1: Fetch latest nightly version (with retry)
69
+ LATEST_NIGHTLY=$(fetch_latest_nightly)
70
+ FETCH_STATUS=$?
71
+
72
+ # Step 2: Network request failed -> skip check, proceed with publish
73
+ if [ $FETCH_STATUS -ne 0 ]; then
74
+ echo "::warning::Failed to fetch PyPI data after $MAX_RETRIES attempts"
75
+ echo "::warning::Skipping commit check, proceeding with publish"
76
+ echo "should_publish=true" >> "$GITHUB_OUTPUT"
77
+ exit 0
78
+ fi
79
+
80
+ # Step 3: No nightly version exists -> first nightly release
81
+ if [ -z "$LATEST_NIGHTLY" ]; then
82
+ echo "No existing nightly version found, proceeding with publish"
83
+ echo "should_publish=true" >> "$GITHUB_OUTPUT"
84
+ exit 0
85
+ fi
86
+
87
+ echo "Latest nightly on PyPI: $LATEST_NIGHTLY"
88
+
89
+ # Step 4: Extract timestamp from version (format: X.Y.Z.devYYYYMMDDHHMMSS)
90
+ TIMESTAMP=$(echo "$LATEST_NIGHTLY" | sed -n 's/.*\.dev\([0-9]\{14\}\).*/\1/p')
91
+
92
+ if [ -z "$TIMESTAMP" ]; then
93
+ echo "::warning::Cannot parse timestamp from version, proceeding with publish"
94
+ echo "should_publish=true" >> "$GITHUB_OUTPUT"
95
+ exit 0
96
+ fi
97
+
98
+ # Step 5: Convert to date format for git log
99
+ SINCE_DATE="${TIMESTAMP:0:4}-${TIMESTAMP:4:2}-${TIMESTAMP:6:2} ${TIMESTAMP:8:2}:${TIMESTAMP:10:2}:${TIMESTAMP:12:2} UTC"
100
+ echo "Last nightly published at: $SINCE_DATE"
101
+
102
+ # Step 6: Check for new commits since last nightly
103
+ # If PACKAGE_PATH is set, only check commits in that subdirectory
104
+ if [ -n "$PACKAGE_PATH" ]; then
105
+ echo "Checking commits in path: $PACKAGE_PATH"
106
+ COMMITS_SINCE=$(git log --since="$SINCE_DATE" --oneline -- "$PACKAGE_PATH" | wc -l)
107
+ else
108
+ COMMITS_SINCE=$(git log --since="$SINCE_DATE" --oneline | wc -l)
109
+ fi
110
+
111
+ if [ "$COMMITS_SINCE" -eq 0 ]; then
112
+ echo "No new commits since last nightly, skipping publish"
113
+ echo "should_publish=false" >> "$GITHUB_OUTPUT"
114
+ exit 0
115
+ else
116
+ echo "Found $COMMITS_SINCE new commit(s) since last nightly"
117
+ echo "should_publish=true" >> "$GITHUB_OUTPUT"
118
+ exit 0
119
+ fi
120
+ }
121
+
122
+ main
@@ -10,6 +10,7 @@ on:
10
10
 
11
11
  permissions:
12
12
  contents: read
13
+ id-token: write # Required for Trusted Publishing (OIDC)
13
14
 
14
15
  jobs:
15
16
  build-and-publish:
@@ -23,9 +24,15 @@ jobs:
23
24
  - uses: actions/setup-python@v5
24
25
  with:
25
26
  python-version: "3.11"
27
+
28
+ - name: Check for new commits since last nightly
29
+ id: check
30
+ if: github.ref_type != 'tag'
31
+ run: bash .github/scripts/check_new_commits.sh
32
+
26
33
  - name: Compute nightly version from latest tag (next patch + timestamp)
27
34
  id: ver
28
- if: github.ref_type != 'tag'
35
+ if: github.ref_type != 'tag' && steps.check.outputs.should_publish != 'false'
29
36
  run: |
30
37
  # Get latest tag; allow 'v' prefix; fail if none
31
38
  if ! TAG=$(git describe --tags --abbrev=0 2>/dev/null); then
@@ -46,6 +53,7 @@ jobs:
46
53
  echo "Computed nightly version: ${NEXT}.dev${DATE}"
47
54
 
48
55
  - name: Build sdist/wheel
56
+ if: github.ref_type == 'tag' || steps.check.outputs.should_publish != 'false'
49
57
  run: |
50
58
  python -m pip install --upgrade pip
51
59
  pip install build setuptools-scm
@@ -55,14 +63,14 @@ jobs:
55
63
  python -m build
56
64
 
57
65
  - name: Check metadata
66
+ if: github.ref_type == 'tag' || steps.check.outputs.should_publish != 'false'
58
67
  run: |
59
68
  pip install twine
60
69
  twine check dist/*
61
70
 
62
- - name: Publish to PyPI (API token)
63
- if: github.event_name == 'schedule' || github.ref_type == 'tag'
71
+ - name: Publish to PyPI (Trusted Publishing)
72
+ if: (github.event_name == 'schedule' || github.ref_type == 'tag') && steps.check.outputs.should_publish != 'false'
64
73
  uses: pypa/gh-action-pypi-publish@release/v1
65
74
  with:
66
- user: __token__
67
- password: ${{ secrets.PYPI_API_TOKEN }}
75
+ attestations: true
68
76
  skip-existing: true
@@ -0,0 +1,63 @@
1
+ name: Website Build Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "website/**"
8
+ - ".github/workflows/website-build.yml"
9
+ pull_request:
10
+ branches: [main]
11
+ paths:
12
+ - "website/**"
13
+ - ".github/workflows/website-build.yml"
14
+ workflow_dispatch:
15
+
16
+ jobs:
17
+ build-test:
18
+ runs-on: ubuntu-slim
19
+ timeout-minutes: 10
20
+
21
+ steps:
22
+ - name: Checkout repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Setup Node.js
26
+ uses: actions/setup-node@v4
27
+ with:
28
+ node-version: "24"
29
+ cache: "npm"
30
+ cache-dependency-path: "website/package-lock.json"
31
+
32
+ - name: Install dependencies
33
+ working-directory: ./website
34
+ run: npm ci
35
+
36
+ - name: Run ESLint
37
+ working-directory: ./website
38
+ run: npm run lint
39
+
40
+ - name: Build website
41
+ working-directory: ./website
42
+ run: npm run build
43
+
44
+ - name: Build standalone website
45
+ working-directory: ./website
46
+ run: npm run build:single
47
+
48
+ - name: Verify build output
49
+ run: |
50
+ if [ ! -d "website/dist" ]; then
51
+ echo "❌ Build failed: dist directory not found"
52
+ exit 1
53
+ fi
54
+ if [ ! -f "website/dist/index.html" ]; then
55
+ echo "❌ Build failed: index.html not found"
56
+ exit 1
57
+ fi
58
+ if [ ! -f "website/dist/standalone.html" ]; then
59
+ echo "❌ Build failed: standalone.html not found"
60
+ exit 1
61
+ fi
62
+ echo "✅ Build successful: all expected files present"
63
+ ls -la website/dist/
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ For detailed release notes, see [GitHub Releases](https://github.com/meta-pytorch/tritonparse/releases).
6
+
7
+ ## [0.3.2] - 2025-12-22
8
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.3.2)
9
+
10
+ ## [0.3.1] - 2025-11-03
11
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.3.1)
12
+
13
+ ## [0.3.0] - 2025-10-14
14
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.3.0)
15
+
16
+ ## [0.2.3] - 2025-09-19
17
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.2.3)
18
+
19
+ ## [0.2.0] - 2025-09-11
20
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.2.0)
21
+
22
+ ## [0.1.1] - 2025-07-25
23
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.1.1)
24
+
25
+ ## [0.1.0] - 2025-07-21
26
+ See [release notes](https://github.com/meta-pytorch/tritonparse/releases/tag/v0.1.0)
@@ -0,0 +1,86 @@
1
+ # Makefile for tritonparse project
2
+
3
+ .PHONY: help format format-check lint lint-check test test-cuda clean install-dev website-install website-lint website-build website-build-single website-dev
4
+
5
+ # Default target
6
+ help:
7
+ @echo "Available targets:"
8
+ @echo " format - Format all Python files"
9
+ @echo " format-check - Check formatting without making changes"
10
+ @echo " lint - Run all linters"
11
+ @echo " lint-check - Check linting without making changes"
12
+ @echo " test - Run tests (CPU only)"
13
+ @echo " test-cuda - Run tests (including CUDA tests)"
14
+ @echo " clean - Clean up cache files"
15
+ @echo " install-dev - Install development dependencies"
16
+ @echo ""
17
+ @echo "Website targets:"
18
+ @echo " website-install - Install website dependencies"
19
+ @echo " website-lint - Run ESLint on website"
20
+ @echo " website-build - Build website"
21
+ @echo " website-build-single - Build standalone website"
22
+ @echo " website-dev - Run website dev server"
23
+
24
+ # Formatting targets
25
+ format:
26
+ @echo "Running format fix script..."
27
+ python -m tritonparse.tools.format_fix --verbose
28
+
29
+ format-check:
30
+ @echo "Checking formatting..."
31
+ python -m tritonparse.tools.format_fix --check-only --verbose
32
+
33
+ # Linting targets
34
+ lint:
35
+ @echo "Running linters..."
36
+ ruff check .
37
+ black --check .
38
+
39
+ lint-check:
40
+ @echo "Checking linting..."
41
+ ruff check --diff .
42
+ black --check --diff .
43
+
44
+ # Testing targets
45
+ test:
46
+ @echo "Running tests (CPU only)..."
47
+ pytest tests/ -v -m "not cuda"
48
+
49
+ test-cuda:
50
+ @echo "Running all tests (including CUDA)..."
51
+ pytest tests/ -v
52
+
53
+ # Utility targets
54
+ clean:
55
+ @echo "Cleaning up cache files..."
56
+ find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
57
+ find . -type f -name "*.pyc" -delete 2>/dev/null || true
58
+ find . -type f -name "*.pyo" -delete 2>/dev/null || true
59
+ find . -type f -name ".coverage" -delete 2>/dev/null || true
60
+ find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
61
+ find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
62
+
63
+ install-dev:
64
+ @echo "Installing development dependencies..."
65
+ pip install -U black usort ruff coverage
66
+
67
+ # Website targets
68
+ website-install:
69
+ @echo "Installing website dependencies..."
70
+ cd website && npm ci
71
+
72
+ website-lint:
73
+ @echo "Running ESLint on website..."
74
+ cd website && npm run lint
75
+
76
+ website-build:
77
+ @echo "Building website..."
78
+ cd website && npm run build
79
+
80
+ website-build-single:
81
+ @echo "Building standalone website..."
82
+ cd website && npm run build:single
83
+
84
+ website-dev:
85
+ @echo "Starting website dev server..."
86
+ cd website && npm run dev
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tritonparse
3
- Version: 0.3.1.dev20251018071448
3
+ Version: 0.3.3.dev20251231071619
4
4
  Summary: TritonParse: A Compiler Tracer, Visualizer, and mini-Reproducer Generator for Triton Kernels
5
5
  Author-email: Yueming Hao <yhao@meta.com>
6
6
  License-Expression: BSD-3-Clause
@@ -78,18 +78,24 @@ pip install triton
78
78
 
79
79
  ```python
80
80
  import tritonparse.structured_logging
81
- import tritonparse.utils
81
+ import tritonparse.parse.utils
82
82
 
83
- # Initialize logging
84
- tritonparse.structured_logging.init("./logs/", enable_trace_launch=True)
83
+ # Initialize logging with full tracing options
84
+ tritonparse.structured_logging.init(
85
+ "./logs/",
86
+ enable_trace_launch=True, # Capture kernel launch events (enables torch.compile tracing automatically)
87
+ enable_more_tensor_information=True, # Optional: collect tensor statistics (min/max/mean/std)
88
+ )
85
89
 
86
90
  # Your Triton/PyTorch code here
87
91
  # ... your kernels ...
88
92
 
89
93
  # Parse and generate trace files
90
- tritonparse.utils.unified_parse("./logs/", out="./parsed_output")
94
+ tritonparse.parse.utils.unified_parse("./logs/", out="./parsed_output")
91
95
  ```
92
96
 
97
+ > **💡 Note**: `enable_trace_launch=True` automatically enables tracing for both native Triton kernels (`@triton.jit`) and `torch.compile` / TorchInductor kernels.
98
+
93
99
  <details>
94
100
  <summary>📝 Example output (click to expand)</summary>
95
101
 
@@ -120,8 +126,9 @@ tritonparse.utils.unified_parse("./logs/", out="./parsed_output")
120
126
  Extract any kernel into a standalone, executable Python script for debugging or testing:
121
127
 
122
128
  ```bash
123
- # Generate reproducer from first launch event
124
- tritonparseoss reproduce ./parsed_output/trace.ndjson.gz --line 2 --out-dir repro_output
129
+ # Generate reproducer for the first launch event
130
+ # (--line is 0-based: line 0 is compilation event, line 1 is first launch event)
131
+ tritonparseoss reproduce ./parsed_output/trace.ndjson.gz --line 1 --out-dir repro_output
125
132
 
126
133
  # Run the generated reproducer
127
134
  cd repro_output/<kernel_name>/
@@ -134,7 +141,7 @@ from tritonparse.reproducer.orchestrator import reproduce
134
141
 
135
142
  result = reproduce(
136
143
  input_path="./parsed_output/trace.ndjson.gz",
137
- line_index=1, # Which launch event (1-based)
144
+ line_index=0, # 0-based index (first event is 0)
138
145
  out_dir="repro_output"
139
146
  )
140
147
  ```
@@ -161,6 +168,9 @@ result = reproduce(
161
168
  | **[🔧 Developer Guide](https://github.com/meta-pytorch/tritonparse/wiki/04.-Developer-Guide)** | Contributing and architecture overview |
162
169
  | **[📝 Code Formatting](https://github.com/meta-pytorch/tritonparse/wiki/05.-Code-Formatting)** | Formatting standards and tools |
163
170
  | **[❓ FAQ](https://github.com/meta-pytorch/tritonparse/wiki/06.-FAQ)** | Quick answers and troubleshooting |
171
+ | **[⚙️ Environment Variables](https://github.com/meta-pytorch/tritonparse/wiki/07.-Environment-Variables-Reference)** | Complete environment variable reference |
172
+ | **[📖 Python API Reference](https://github.com/meta-pytorch/tritonparse/wiki/08.-Python-API-Reference)** | Full API documentation |
173
+ | **[🔄 Reproducer Guide](https://github.com/meta-pytorch/tritonparse/wiki/09.-Reproducer-Guide)** | Comprehensive kernel reproducer guide |
164
174
 
165
175
  ## 📊 Understanding Triton Compilation
166
176
 
@@ -60,18 +60,24 @@ pip install triton
60
60
 
61
61
  ```python
62
62
  import tritonparse.structured_logging
63
- import tritonparse.utils
63
+ import tritonparse.parse.utils
64
64
 
65
- # Initialize logging
66
- tritonparse.structured_logging.init("./logs/", enable_trace_launch=True)
65
+ # Initialize logging with full tracing options
66
+ tritonparse.structured_logging.init(
67
+ "./logs/",
68
+ enable_trace_launch=True, # Capture kernel launch events (enables torch.compile tracing automatically)
69
+ enable_more_tensor_information=True, # Optional: collect tensor statistics (min/max/mean/std)
70
+ )
67
71
 
68
72
  # Your Triton/PyTorch code here
69
73
  # ... your kernels ...
70
74
 
71
75
  # Parse and generate trace files
72
- tritonparse.utils.unified_parse("./logs/", out="./parsed_output")
76
+ tritonparse.parse.utils.unified_parse("./logs/", out="./parsed_output")
73
77
  ```
74
78
 
79
+ > **💡 Note**: `enable_trace_launch=True` automatically enables tracing for both native Triton kernels (`@triton.jit`) and `torch.compile` / TorchInductor kernels.
80
+
75
81
  <details>
76
82
  <summary>📝 Example output (click to expand)</summary>
77
83
 
@@ -102,8 +108,9 @@ tritonparse.utils.unified_parse("./logs/", out="./parsed_output")
102
108
  Extract any kernel into a standalone, executable Python script for debugging or testing:
103
109
 
104
110
  ```bash
105
- # Generate reproducer from first launch event
106
- tritonparseoss reproduce ./parsed_output/trace.ndjson.gz --line 2 --out-dir repro_output
111
+ # Generate reproducer for the first launch event
112
+ # (--line is 0-based: line 0 is compilation event, line 1 is first launch event)
113
+ tritonparseoss reproduce ./parsed_output/trace.ndjson.gz --line 1 --out-dir repro_output
107
114
 
108
115
  # Run the generated reproducer
109
116
  cd repro_output/<kernel_name>/
@@ -116,7 +123,7 @@ from tritonparse.reproducer.orchestrator import reproduce
116
123
 
117
124
  result = reproduce(
118
125
  input_path="./parsed_output/trace.ndjson.gz",
119
- line_index=1, # Which launch event (1-based)
126
+ line_index=0, # 0-based index (first event is 0)
120
127
  out_dir="repro_output"
121
128
  )
122
129
  ```
@@ -143,6 +150,9 @@ result = reproduce(
143
150
  | **[🔧 Developer Guide](https://github.com/meta-pytorch/tritonparse/wiki/04.-Developer-Guide)** | Contributing and architecture overview |
144
151
  | **[📝 Code Formatting](https://github.com/meta-pytorch/tritonparse/wiki/05.-Code-Formatting)** | Formatting standards and tools |
145
152
  | **[❓ FAQ](https://github.com/meta-pytorch/tritonparse/wiki/06.-FAQ)** | Quick answers and troubleshooting |
153
+ | **[⚙️ Environment Variables](https://github.com/meta-pytorch/tritonparse/wiki/07.-Environment-Variables-Reference)** | Complete environment variable reference |
154
+ | **[📖 Python API Reference](https://github.com/meta-pytorch/tritonparse/wiki/08.-Python-API-Reference)** | Full API documentation |
155
+ | **[🔄 Reproducer Guide](https://github.com/meta-pytorch/tritonparse/wiki/09.-Reproducer-Guide)** | Comprehensive kernel reproducer guide |
146
156
 
147
157
  ## 📊 Understanding Triton Compilation
148
158
 
@@ -12,9 +12,8 @@ import os
12
12
  import torch
13
13
  import triton
14
14
  import triton.language as tl
15
-
15
+ import tritonparse.parse.utils
16
16
  import tritonparse.structured_logging
17
- import tritonparse.utils
18
17
 
19
18
  log_path = "./logs"
20
19
  tritonparse.structured_logging.init(log_path, enable_trace_launch=True)
@@ -76,6 +75,6 @@ def test_tensor_add():
76
75
  if __name__ == "__main__":
77
76
  test_tensor_add()
78
77
  # Use improved unified_parse with explicit output directory
79
- tritonparse.utils.unified_parse(
78
+ tritonparse.parse.utils.unified_parse(
80
79
  source=log_path, out="./parsed_output", overwrite=True
81
80
  )