diff --git a/tritonparse/__main__.py b/tritonparse/__main__.py index 2f05ddc..af22d0d 100644 --- a/tritonparse/__main__.py +++ b/tritonparse/__main__.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from .cli import main diff --git a/tritonparse/context_manager.py b/tritonparse/context_manager.py index dbe72e7..61a2ceb 100644 --- a/tritonparse/context_manager.py +++ b/tritonparse/context_manager.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import os import shutil import tempfile diff --git a/tritonparse/event_diff.py b/tritonparse/event_diff.py index 201b7b3..4405599 100644 --- a/tritonparse/event_diff.py +++ b/tritonparse/event_diff.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import json from collections import defaultdict from typing import Any, Dict, List, Tuple diff --git a/tritonparse/ir_analysis.py b/tritonparse/ir_analysis.py index 20addd3..f1a81ed 100644 --- a/tritonparse/ir_analysis.py +++ b/tritonparse/ir_analysis.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import logging from .sourcemap_utils import load_ir_contents diff --git a/tritonparse/ir_parser.py b/tritonparse/ir_parser.py index a7d2ea2..7751169 100644 --- a/tritonparse/ir_parser.py +++ b/tritonparse/ir_parser.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import logging import os import re diff --git a/tritonparse/mapper.py b/tritonparse/mapper.py index 2520b6f..f208f6f 100644 --- a/tritonparse/mapper.py +++ b/tritonparse/mapper.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import logging from collections import defaultdict from typing import Any, Dict, List, Tuple diff --git a/tritonparse/reproducer/cli.py b/tritonparse/reproducer/cli.py index 2ac07b9..cdfd97e 100644 --- a/tritonparse/reproducer/cli.py +++ b/tritonparse/reproducer/cli.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import argparse from tritonparse.reproducer.types import KernelImportMode diff --git a/tritonparse/reproducer/function_extractor.py b/tritonparse/reproducer/function_extractor.py index bfc0c63..e9ccfef 100644 --- a/tritonparse/reproducer/function_extractor.py +++ b/tritonparse/reproducer/function_extractor.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + """ Function extractor for reproducer utility functions. diff --git a/tritonparse/reproducer/ingestion/ndjson.py b/tritonparse/reproducer/ingestion/ndjson.py index cd93b59..1a247c5 100644 --- a/tritonparse/reproducer/ingestion/ndjson.py +++ b/tritonparse/reproducer/ingestion/ndjson.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple diff --git a/tritonparse/reproducer/orchestrator.py b/tritonparse/reproducer/orchestrator.py index 3ab3ebb..39d28cf 100644 --- a/tritonparse/reproducer/orchestrator.py +++ b/tritonparse/reproducer/orchestrator.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from pathlib import Path from typing import Optional diff --git a/tritonparse/reproducer/placeholder_replacer.py b/tritonparse/reproducer/placeholder_replacer.py index 734b078..3453b55 100644 --- a/tritonparse/reproducer/placeholder_replacer.py +++ b/tritonparse/reproducer/placeholder_replacer.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from abc import ABC from typing import Any, Dict, Protocol diff --git a/tritonparse/reproducer/templates/loader.py b/tritonparse/reproducer/templates/loader.py index b4aaab2..7caa27f 100644 --- a/tritonparse/reproducer/templates/loader.py +++ b/tritonparse/reproducer/templates/loader.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from importlib.resources import files as pkg_files from pathlib import Path from typing import List diff --git a/tritonparse/reproducer/types.py b/tritonparse/reproducer/types.py index 6683146..5f8779f 100644 --- a/tritonparse/reproducer/types.py +++ b/tritonparse/reproducer/types.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + from enum import Enum diff --git a/tritonparse/reproducer/utils.py b/tritonparse/reproducer/utils.py index 5657db7..0fbfdfc 100644 --- a/tritonparse/reproducer/utils.py +++ b/tritonparse/reproducer/utils.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import importlib import importlib.util import json diff --git a/tritonparse/shared_vars.py b/tritonparse/shared_vars.py index ad6be87..bb0dbb2 100644 --- a/tritonparse/shared_vars.py +++ b/tritonparse/shared_vars.py @@ -1,3 +1,4 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. # We'd like to sperate structured logging module and tritonparse module as much as possible. So, put the shared variables here. import os diff --git a/tritonparse/sourcemap_utils.py b/tritonparse/sourcemap_utils.py index e2e9b75..354dace 100644 --- a/tritonparse/sourcemap_utils.py +++ b/tritonparse/sourcemap_utils.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import logging from typing import Any, Dict, List diff --git a/tritonparse/tools/decompress_bin_ndjson.py b/tritonparse/tools/decompress_bin_ndjson.py index 030a1d1..77365e5 100644 --- a/tritonparse/tools/decompress_bin_ndjson.py +++ b/tritonparse/tools/decompress_bin_ndjson.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. + """ Script to decompress .bin.ndjson files back to regular .ndjson format. diff --git a/tritonparse/tools/format_fix.py b/tritonparse/tools/format_fix.py index de30a8f..5a2466b 100644 --- a/tritonparse/tools/format_fix.py +++ b/tritonparse/tools/format_fix.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. + """ Format fix script for tritonparse project. diff --git a/tritonparse/tools/load_tensor.py b/tritonparse/tools/load_tensor.py index 759d082..0ae9248 100644 --- a/tritonparse/tools/load_tensor.py +++ b/tritonparse/tools/load_tensor.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. + """ Simple tensor loading utility for tritonparse saved tensors. Usage: diff --git a/tritonparse/tools/prettify_ndjson.py b/tritonparse/tools/prettify_ndjson.py index 6c637c8..72fb5e8 100644 --- a/tritonparse/tools/prettify_ndjson.py +++ b/tritonparse/tools/prettify_ndjson.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. + """ Convert an NDJSON file to a prettified JSON file. diff --git a/tritonparse/trace_processor.py b/tritonparse/trace_processor.py index b321e6b..7c98af1 100644 --- a/tritonparse/trace_processor.py +++ b/tritonparse/trace_processor.py @@ -1,3 +1,5 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. + import gzip import json import logging