tritonparse 0.2.4.dev20250929071529__tar.gz → 0.2.4.dev20251001071529__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.
Potentially problematic release.
This version of tritonparse might be problematic. Click here for more details.
- {tritonparse-0.2.4.dev20250929071529/tritonparse.egg-info → tritonparse-0.2.4.dev20251001071529}/PKG-INFO +1 -1
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/test_tritonparse.py +1 -1
- tritonparse-0.2.4.dev20251001071529/tritonparse/context_manager.py +23 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/orchestrator.py +14 -8
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/structured_logging.py +3 -8
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/prettify_ndjson.py +11 -11
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/utils.py +3 -1
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529/tritonparse.egg-info}/PKG-INFO +1 -1
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse.egg-info/SOURCES.txt +1 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/index.css +1 -3
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/README.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/install-project.sh +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/install-triton-kernels.sh +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/install-triton.sh +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/run-tests.sh +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/setup.sh +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/PAGES_SETUP.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/copilot-instructions.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/workflows/deploy-pages-standalone.yml +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/workflows/deploy-pages.yml +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/workflows/nightly-pypi.yml +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/workflows/test.yml +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.gitignore +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/CHANGELOG.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/CODE_OF_CONDUCT.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/CONTRIBUTING.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/LICENSE +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/Makefile +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/README.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/__init__.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/docs/README.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/docs/screenshots/code-comparison.png +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/docs/screenshots/kernel-overview.png +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/pyproject.toml +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/run.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/setup.cfg +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/README.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/__init__.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/logs/dedicated_log_triton_trace_findhao_.ndjson +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/parsed_output/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/parsed_output/f0_fc0_a0_cai-.ndjson.gz +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/parsed_output/log_file_list.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/parsed_output_complex/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/parsed_output_complex/log_file_list.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/example_output/repro/repro_context_20250816192455.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/test_add.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/__init__.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/common.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/event_diff.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/extract_source_mappings.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/ir_parser.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/mapper.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/__init__.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/cli.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/ingestion/ndjson.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/templates/example.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/templates/loader.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/reproducer/utils.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/shared_vars.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/source_type.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/sourcemap_utils.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/__init__.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/decompress_bin_ndjson.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/format_fix.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/load_tensor.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tools/readme.md +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tp_logger.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/trace_processor.py +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse.egg-info/dependency_links.txt +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse.egg-info/requires.txt +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse.egg-info/top_level.txt +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/eslint.config.js +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/index.html +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/package-lock.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/package.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/postcss.config.js +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/public/dedicated_log_triton_trace_findhao__mapped.ndjson.gz +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/public/f0_fc0_a0_cai-.ndjson +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/public/favicon.ico +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/public/logo.svg +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/scripts/inline-html.js +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/App.css +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/App.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/assets/react.svg +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/ArgumentViewer.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/Callstack.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/CodeComparisonView.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/CodeViewer.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/CompilationInfo.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/CopyCodeButton.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/DataSourceSelector.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/DiffComparisonView.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/DiffViewer.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/ExternalLink.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/SingleCodeViewer.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/StackDiffViewer.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/ToggleSwitch.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/TritonIRs.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/components/WelcomeScreen.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/context/FileDiffSession.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/main.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/pages/CodeView.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/pages/FileDiffView.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/pages/KernelOverview.tsx +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/utils/dataLoader.ts +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/utils/fbDetection.ts +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/utils/safeImport.ts +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/utils/tensor.ts +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/vite-env.d.ts +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/tailwind.config.js +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/tsconfig.app.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/tsconfig.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/tsconfig.node.json +0 -0
- {tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/vite.config.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tritonparse
|
|
3
|
-
Version: 0.2.4.
|
|
3
|
+
Version: 0.2.4.dev20251001071529
|
|
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
|
|
@@ -776,7 +776,7 @@ class TestTritonparseCUDA(unittest.TestCase):
|
|
|
776
776
|
|
|
777
777
|
from tritonparse.tools.prettify_ndjson import load_ndjson as _load_ndjson
|
|
778
778
|
|
|
779
|
-
events = _load_ndjson(_Path(ndjson_path)
|
|
779
|
+
events = _load_ndjson(_Path(ndjson_path))
|
|
780
780
|
launch_indices = [
|
|
781
781
|
i for i, ev in enumerate(events) if ev.get("event_type") == "launch"
|
|
782
782
|
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
import tempfile
|
|
4
|
+
|
|
5
|
+
from .structured_logging import clear_logging_config, init
|
|
6
|
+
from .utils import unified_parse
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def createUniqueTempDirectory():
|
|
10
|
+
return tempfile.mkdtemp()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TritonParseManager:
|
|
14
|
+
def __enter__(self):
|
|
15
|
+
self.dir_path = createUniqueTempDirectory()
|
|
16
|
+
init(self.dir_path)
|
|
17
|
+
return self
|
|
18
|
+
|
|
19
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
20
|
+
self.output_link = unified_parse(source=self.dir_path, overwrite=True)
|
|
21
|
+
clear_logging_config()
|
|
22
|
+
if os.path.exists(self.dir_path):
|
|
23
|
+
shutil.rmtree(self.dir_path)
|
|
@@ -18,7 +18,7 @@ def reproduce(
|
|
|
18
18
|
line_index: int,
|
|
19
19
|
out_dir: str,
|
|
20
20
|
template: str,
|
|
21
|
-
):
|
|
21
|
+
) -> dict[str, Path]:
|
|
22
22
|
"""
|
|
23
23
|
Generate a reproducer script from NDJSON trace file.
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ def reproduce(
|
|
|
28
28
|
out_dir: Output directory for reproducer files.
|
|
29
29
|
"""
|
|
30
30
|
logger.debug(f"Building bundle from {input_path} at line {line_index}")
|
|
31
|
-
events = load_ndjson(Path(input_path)
|
|
31
|
+
events = load_ndjson(Path(input_path))
|
|
32
32
|
logger.debug(f"Loaded {len(events)} events")
|
|
33
33
|
|
|
34
34
|
# Build context bundle from the specified launch event
|
|
@@ -55,9 +55,15 @@ def reproduce(
|
|
|
55
55
|
"# {{KERNEL_INVOCATION_PLACEHOLDER}}", invocation_snippet
|
|
56
56
|
)
|
|
57
57
|
out_py_path.write_text(final_code, encoding="utf-8")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
|
|
59
|
+
filepath = context_bundle.kernel_info.file_path
|
|
60
|
+
filepath = "/".join(filepath.split("/")[5:])
|
|
61
|
+
ret = {
|
|
62
|
+
"kernel_src_path": filepath,
|
|
63
|
+
"kernel": context_bundle.kernel_info.function_name,
|
|
64
|
+
"repo_script": str(out_py_path.resolve()),
|
|
65
|
+
"repo_context": str(temp_json_path.resolve()),
|
|
66
|
+
}
|
|
67
|
+
logger.info("REPRODUCER_OUTPUT\n%s", ret)
|
|
68
|
+
|
|
69
|
+
return ret
|
|
@@ -28,8 +28,6 @@ log = logging.getLogger(__name__)
|
|
|
28
28
|
|
|
29
29
|
TEXT_FILE_EXTENSIONS = [".ttir", ".ttgir", ".llir", ".ptx", ".amdgcn", ".json"]
|
|
30
30
|
MAX_FILE_SIZE = 10 * 1024 * 1024 # 10MB limit for file content extraction
|
|
31
|
-
# Enable ndjson output. json format is only for debugging purpose.
|
|
32
|
-
TRITONPARSE_NDJSON = os.getenv("TRITONPARSE_NDJSON", "1") in ["1", "true", "True"]
|
|
33
31
|
# Enable gzip compression for each line in trace files
|
|
34
32
|
TRITON_TRACE_GZIP = os.getenv("TRITON_TRACE_GZIP", "0") in ["1", "true", "True"]
|
|
35
33
|
triton_trace_log = logging.getLogger("tritonparse_trace")
|
|
@@ -505,12 +503,9 @@ class TritonJsonFormatter(logging.Formatter):
|
|
|
505
503
|
if payload is not None:
|
|
506
504
|
log_entry["payload"] = json.loads(payload)
|
|
507
505
|
clean_log_entry = convert(log_entry)
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
# NDJSON format requires a newline at the end of each line
|
|
512
|
-
json_str = json.dumps(clean_log_entry, separators=(",", ":"))
|
|
513
|
-
return json_str + "\n"
|
|
506
|
+
# NDJSON format requires a newline at the end of each line
|
|
507
|
+
json_str = json.dumps(clean_log_entry, separators=(",", ":"))
|
|
508
|
+
return json_str + "\n"
|
|
514
509
|
|
|
515
510
|
|
|
516
511
|
class TritonTraceHandler(logging.StreamHandler):
|
|
@@ -31,7 +31,7 @@ Example:
|
|
|
31
31
|
Usage:
|
|
32
32
|
python prettify_ndjson.py data.ndjson
|
|
33
33
|
python prettify_ndjson.py --lines 1,3 data.ndjson # Only process lines 1 and 3
|
|
34
|
-
python prettify_ndjson.py --save-irs logs.ndjson #
|
|
34
|
+
python prettify_ndjson.py --not-save-irs logs.ndjson # Remove large fields for compilation events
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
"""
|
|
@@ -99,14 +99,14 @@ def parse_line_ranges(lines_arg: str) -> set[int]:
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
def load_ndjson(
|
|
102
|
-
file_path: Path,
|
|
102
|
+
file_path: Path, not_save_irs: bool = False, line_filter: set[int] | None = None
|
|
103
103
|
) -> List[Any]:
|
|
104
104
|
"""
|
|
105
105
|
Load NDJSON file and return list of JSON objects.
|
|
106
106
|
|
|
107
107
|
Args:
|
|
108
108
|
file_path: Path to the NDJSON file
|
|
109
|
-
|
|
109
|
+
not_save_irs: Whether to NOT save file_content and python_source for compilation events
|
|
110
110
|
line_filter: Set of line numbers to include (1-based indexing), None means include all
|
|
111
111
|
|
|
112
112
|
Returns:
|
|
@@ -138,8 +138,8 @@ def load_ndjson(
|
|
|
138
138
|
try:
|
|
139
139
|
json_obj = json.loads(line)
|
|
140
140
|
|
|
141
|
-
# Filter out file_content and python_source for compilation events if
|
|
142
|
-
if
|
|
141
|
+
# Filter out file_content and python_source for compilation events if not_save_irs is True
|
|
142
|
+
if not_save_irs and isinstance(json_obj, dict):
|
|
143
143
|
event_type = json_obj.get("event_type")
|
|
144
144
|
if event_type == "compilation":
|
|
145
145
|
# Remove file_content and python_source from payload if they exist
|
|
@@ -188,13 +188,13 @@ def load_ndjson(
|
|
|
188
188
|
print("Line filtering: no valid lines specified")
|
|
189
189
|
|
|
190
190
|
# Print warning if compilation events were filtered
|
|
191
|
-
if
|
|
191
|
+
if not_save_irs and filtered_compilation_events > 0:
|
|
192
192
|
print(
|
|
193
193
|
f"WARNING: Removed 'file_content' and 'python_source' fields from {filtered_compilation_events} compilation events to reduce file size.",
|
|
194
194
|
file=sys.stderr,
|
|
195
195
|
)
|
|
196
196
|
print(
|
|
197
|
-
"
|
|
197
|
+
" Re-run without --not-save-irs flag to preserve these fields if needed.",
|
|
198
198
|
file=sys.stderr,
|
|
199
199
|
)
|
|
200
200
|
|
|
@@ -237,10 +237,10 @@ Examples:
|
|
|
237
237
|
)
|
|
238
238
|
|
|
239
239
|
parser.add_argument(
|
|
240
|
-
"--save-irs",
|
|
240
|
+
"--not-save-irs",
|
|
241
241
|
action="store_true",
|
|
242
242
|
default=False,
|
|
243
|
-
help="
|
|
243
|
+
help="Do not save file_content and python_source for compilation events (default: False, removes these fields to reduce size)",
|
|
244
244
|
)
|
|
245
245
|
|
|
246
246
|
parser.add_argument(
|
|
@@ -293,12 +293,12 @@ Examples:
|
|
|
293
293
|
|
|
294
294
|
# Load NDJSON file
|
|
295
295
|
print(f"Loading NDJSON file: {input_path}")
|
|
296
|
-
if
|
|
296
|
+
if args.not_save_irs:
|
|
297
297
|
print(
|
|
298
298
|
"Filtering out file_content and python_source from compilation events to reduce size"
|
|
299
299
|
)
|
|
300
300
|
json_objects = load_ndjson(
|
|
301
|
-
input_path,
|
|
301
|
+
input_path, not_save_irs=args.not_save_irs, line_filter=line_filter
|
|
302
302
|
)
|
|
303
303
|
print(f"Loaded {len(json_objects)} JSON objects")
|
|
304
304
|
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/utils.py
RENAMED
|
@@ -106,6 +106,7 @@ def oss_run(
|
|
|
106
106
|
else:
|
|
107
107
|
out_dir = str(Path(parsed_log_dir).absolute())
|
|
108
108
|
print_parsed_files_summary(out_dir)
|
|
109
|
+
return None
|
|
109
110
|
|
|
110
111
|
|
|
111
112
|
def unified_parse(
|
|
@@ -134,7 +135,7 @@ def unified_parse(
|
|
|
134
135
|
else:
|
|
135
136
|
parse = oss_run
|
|
136
137
|
|
|
137
|
-
parse(
|
|
138
|
+
output = parse(
|
|
138
139
|
source=source,
|
|
139
140
|
out=out,
|
|
140
141
|
overwrite=overwrite,
|
|
@@ -143,3 +144,4 @@ def unified_parse(
|
|
|
143
144
|
verbose=verbose,
|
|
144
145
|
**kwargs,
|
|
145
146
|
)
|
|
147
|
+
return output
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tritonparse
|
|
3
|
-
Version: 0.2.4.
|
|
3
|
+
Version: 0.2.4.dev20251001071529
|
|
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
|
|
@@ -36,6 +36,7 @@ tests/example_output/parsed_output_complex/log_file_list.json
|
|
|
36
36
|
tests/example_output/repro/repro_context_20250816192455.json
|
|
37
37
|
tritonparse/__init__.py
|
|
38
38
|
tritonparse/common.py
|
|
39
|
+
tritonparse/context_manager.py
|
|
39
40
|
tritonparse/event_diff.py
|
|
40
41
|
tritonparse/extract_source_mappings.py
|
|
41
42
|
tritonparse/ir_parser.py
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/install-project.sh
RENAMED
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/install-triton.sh
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.ci/run-tests.sh
RENAMED
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/.github/PAGES_SETUP.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/CODE_OF_CONDUCT.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tests/test_add.py
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/__init__.py
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/common.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/ir_parser.py
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/mapper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/tritonparse/tp_logger.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/eslint.config.js
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/index.html
RENAMED
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/package.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/public/logo.svg
RENAMED
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/App.css
RENAMED
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/App.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/src/main.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/tsconfig.json
RENAMED
|
File without changes
|
|
File without changes
|
{tritonparse-0.2.4.dev20250929071529 → tritonparse-0.2.4.dev20251001071529}/website/vite.config.ts
RENAMED
|
File without changes
|