diff --git a/pybuda/test/fx/test_basics.py b/pybuda/test/fx/test_basics.py index 45f07cabf..6b3597a6c 100644 --- a/pybuda/test/fx/test_basics.py +++ b/pybuda/test/fx/test_basics.py @@ -20,7 +20,6 @@ class NoInputModel(torch.nn.Module): def forward(self): return torch.tensor([1]) -@pytest.mark.skip(reason="https://yyz-gitlab.local.tenstorrent.com/tenstorrent/pybuda/-/issues/2475") def test_no_input_model(): # Test the case where the model has no inputs generic_model_test(NoInputModel(), num_inputs=0) @@ -61,7 +60,6 @@ def test_print(): tensor = torch.rand(32, 32).to('tt') print(tensor) -@pytest.mark.skip(reason="https://yyz-gitlab.local.tenstorrent.com/tenstorrent/pybuda/-/issues/2438") def test_longint(): original_data = torch.randint(0, 10, (1, 8)) tensor = original_data.to('tt').to(dtype=torch.int).to('cpu') diff --git a/pybuda/test/model_demos/high_prio/cnn/pytorch/test_yolo_v5.py b/pybuda/test/model_demos/high_prio/cnn/pytorch/test_yolo_v5.py index 2ca404b34..2e7e8d7a1 100644 --- a/pybuda/test/model_demos/high_prio/cnn/pytorch/test_yolo_v5.py +++ b/pybuda/test/model_demos/high_prio/cnn/pytorch/test_yolo_v5.py @@ -83,7 +83,7 @@ def test_yolov5_320x320(test_device, size): def generate_model_yoloV5I640_imgcls_torchhub_pytorch(test_device, variant, size): - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 + # env vars needed to support 640x640 yolov5 working compiler_cfg = _get_global_compiler_config() compiler_cfg.balancer_policy = "Ribbon" compiler_cfg.enable_auto_fusing = False @@ -233,7 +233,7 @@ def generate_model_yoloV5I480_imgcls_torchhub_pytorch(test_device, variant, size os.environ["TT_BACKEND_OVERLAY_MAX_EXTRA_BLOB_SIZE"] = f"{16*1024}" elif test_device.arch == BackendDevice.Wormhole_B0: - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 + # env vars needed to support 640x640 yolov5 working compiler_cfg.default_df_override = DataFormat.Float16_b os.environ["PYBUDA_RIBBON2"] = "1" @@ -300,7 +300,7 @@ def test_yolov5_480x480(test_device, size): @pytest.mark.skip(reason="Not supported") def test_yolov5_1280x1280(test_device): - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 + # env vars needed to support 640x640 yolov5 working os.environ["PYBUDA_PAD_SPARSE_MM"] = "{13:16}" os.environ["PYBUDA_INSERT_SLICE_FOR_CONCAT"] = "1" diff --git a/pybuda/test/tvm/cnn/pytorch/tests_A/test_googlenet.py b/pybuda/test/tvm/cnn/pytorch/tests_A/test_googlenet.py index a1d35688b..57a333319 100644 --- a/pybuda/test/tvm/cnn/pytorch/tests_A/test_googlenet.py +++ b/pybuda/test/tvm/cnn/pytorch/tests_A/test_googlenet.py @@ -60,7 +60,6 @@ def test_googlenet_torchvision(test_kind, test_device): ): # Always run with recompute in post-commit CI. Nightly tests both pytest.skip() - # Adding required environment variables as per https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/43 import os # This will allow the test to pass but we should use conv padding to fix the issue instead # os.environ["PYBUDA_EXTRA_L1_MARGIN"] = "30000" diff --git a/pybuda/test/tvm/cnn/pytorch/tests_B/test_mobilenet_v2.py b/pybuda/test/tvm/cnn/pytorch/tests_B/test_mobilenet_v2.py index 9287d34e7..646f80faa 100644 --- a/pybuda/test/tvm/cnn/pytorch/tests_B/test_mobilenet_v2.py +++ b/pybuda/test/tvm/cnn/pytorch/tests_B/test_mobilenet_v2.py @@ -73,7 +73,6 @@ def test_mobilenetv2_deeplab(test_kind, test_device): if test_kind.is_training(): pytest.skip() # Backward is currently unsupported - # SET CONV PADDING ENVIRONMENT VARIABLE: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/36 import os os.environ["PYBUDA_PAD_SPARSE_MM"] = "{25:26}" diff --git a/pybuda/test/tvm/cnn/pytorch/tests_C/test_densenet.py b/pybuda/test/tvm/cnn/pytorch/tests_C/test_densenet.py index b11a45465..fb899b220 100644 --- a/pybuda/test/tvm/cnn/pytorch/tests_C/test_densenet.py +++ b/pybuda/test/tvm/cnn/pytorch/tests_C/test_densenet.py @@ -26,7 +26,6 @@ def test_densenet_121(test_kind, test_device): compiler_cfg = _get_global_compiler_config() compiler_cfg.balancer_policy = "CNN" - # Add required env vars as per https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/48 import os os.environ["PYBUDA_DISABLE_CONSTANT_FOLDING"] = "1" @@ -56,7 +55,6 @@ def test_densenet_169(test_kind, test_device): compiler_cfg = _get_global_compiler_config() compiler_cfg.balancer_policy = "CNN" - # Add required env vars as per https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/48 import os os.environ["PYBUDA_DISABLE_CONSTANT_FOLDING"] = "1" os.environ["PYBUDA_GRAPHSOLVER_SELF_CUT_TYPE"] = "ConsumerOperandDataEdgesFirst" @@ -89,7 +87,6 @@ def test_densenet_201(test_kind, test_device): compiler_cfg = _get_global_compiler_config() compiler_cfg.balancer_policy = "CNN" - # Add required env vars as per https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/48 import os os.environ["PYBUDA_DISABLE_CONSTANT_FOLDING"] = "1" os.environ["PYBUDA_GRAPHSOLVER_SELF_CUT_TYPE"] = "ConsumerOperandDataEdgesFirst" @@ -122,7 +119,6 @@ def test_densenet_161(test_kind, test_device): compiler_cfg = _get_global_compiler_config() compiler_cfg.balancer_policy = "CNN" - # Add required env vars as per https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/48 import os os.environ["PYBUDA_DISABLE_CONSTANT_FOLDING"] = "1" os.environ["PYBUDA_GRAPHSOLVER_SELF_CUT_TYPE"] = "ConsumerOperandDataEdgesFirst" diff --git a/pybuda/test/tvm/cnn/pytorch/tests_C/test_yolov5.py b/pybuda/test/tvm/cnn/pytorch/tests_C/test_yolov5.py index 663d6c582..5bb09107c 100644 --- a/pybuda/test/tvm/cnn/pytorch/tests_C/test_yolov5.py +++ b/pybuda/test/tvm/cnn/pytorch/tests_C/test_yolov5.py @@ -80,7 +80,6 @@ def test_yolov5_480x480(test_kind, test_device): if test_kind.is_training(): pytest.skip() # Backward is currently unsupported - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 import os os.environ["PYBUDA_PAD_SPARSE_MM"] = "{13:16}" os.environ["PYBUDA_INSERT_SLICE_FOR_CONCAT"] = "1" @@ -123,7 +122,6 @@ def test_yolov5m_640x640(test_kind, test_device): if test_kind.is_training(): pytest.skip() # Backward is currently unsupported - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 import os os.environ["PYBUDA_PAD_SPARSE_MM"] = "{13:16, 3:4}" os.environ["PYBUDA_INSERT_SLICE_FOR_CONCAT"] = "1" @@ -162,7 +160,6 @@ def test_yolov5_1280x1280(test_kind, test_device): if test_kind.is_training(): pytest.skip() # Backward is currently unsupported - # Add required env vars as per: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/model-demos/-/issues/46 import os os.environ["PYBUDA_PAD_SPARSE_MM"] = "{13:16}" os.environ["PYBUDA_INSERT_SLICE_FOR_CONCAT"] = "1" diff --git a/scripts/compare_perf.py b/scripts/compare_perf.py index 284e5073f..83d39f4d0 100644 --- a/scripts/compare_perf.py +++ b/scripts/compare_perf.py @@ -91,6 +91,7 @@ def main(): build_ids = args.build_ids # correct the build ids prefix + # TODO: Refactor the code to work on whatever new performance comparision we use in the future. prefix = "gitlab-pipeline-" build_ids = [(x if x.startswith(prefix) else prefix + str(x)) for x in build_ids] @@ -106,7 +107,7 @@ def main(): if __name__ == "__main__": main() - +# TODO: Refactor the code to work on whatever new performance comparision we use in the future. def test_compare_perf(): df = compare_perf(["gitlab-pipeline-479274", "gitlab-pipeline-479323"]) print_diff(df) diff --git a/scripts/gitlab_single_job_history.py b/scripts/gitlab_single_job_history.py deleted file mode 100644 index d21907c23..000000000 --- a/scripts/gitlab_single_job_history.py +++ /dev/null @@ -1,139 +0,0 @@ -# SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC - -# SPDX-License-Identifier: Apache-2.0 - -import datetime - -import gitlab -import tabulate - -# GitLab configurations -gitlab_url = "https://yyz-gitlab.local.tenstorrent.com/" -private_token = "[YOUR_GITLAB_PRIVATE_TOKEN]" -project_id = "tenstorrent/pybuda" - -# Other configurations -gitlab_datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" -print_datetime_format = "%d-%m-%Y %H:%M:%S" - -# Filter conditions -schedule_name = "PyBuda Dev Models" # Name of the scheduled pipeline to reference -job_name = "[job name]" # Job name, e.g. silicon-nlp-pytorch-xglm-wh-b0-n150 -pipeline_limit_num = 9 # History limit for specified job - - -def filter_pipeline_condition(pipeline): - condition = True - - # Reference only "main" branch - if pipeline.ref.lower() != "main": - condition = False - - # Reference only scheduled pipelines (nightlies, weeklies) - if pipeline.source.lower() != "schedule": - condition = False - - if pipeline.status.lower() == "canceled": - condition = False - - return condition - - -def collect_pipeline_details(pipeline): - details = {} - - details["id"] = pipeline.id - details["status"] = pipeline.status - - started_at = datetime.datetime.strptime(pipeline.started_at, gitlab_datetime_format) if pipeline.started_at else None - details["started_at"] = started_at.strftime(print_datetime_format) if started_at else "N/A" - finished_at = datetime.datetime.strptime(pipeline.finished_at, gitlab_datetime_format) if pipeline.finished_at else None - details["finished_at"] = finished_at.strftime(print_datetime_format) if started_at and finished_at else "N/A" - details["duration"] = pipeline.duration - - details["ref"] = pipeline.ref - details["sha"] = pipeline.sha - details["source"] = pipeline.source - details["web_url"] = pipeline.web_url - - return details - - -def filter_job_condition(job, job_name=None): - condition = True - - # Reference only specific job - if job_name != "" and job.name.lower() != job_name.lower(): - condition = False - - return condition - - -def collect_job_details(job): - details = {} - - details["name"] = job.name - details["ref"] = job.ref - details["stage"] = job.stage - details["status"] = "❌ " + job.status if job.status == "failed" else "✅ " + job.status - details["web_url"] = job.web_url - - started_at = datetime.datetime.strptime(job.started_at, gitlab_datetime_format) if job.started_at else None - details["started_at"] = started_at.strftime(print_datetime_format) if started_at else "N/A" - finished_at = datetime.datetime.strptime(job.finished_at, gitlab_datetime_format) if job.finished_at else None - details["finished_at"] = finished_at.strftime(print_datetime_format) if started_at else "N/A" - details["duration"] = job.duration - - details["short_commit"] = job.commit["short_id"] - - return details - - -def print_job_history_table(table_rows): - job_heading = f"| History for: {job_name} |" - table_headers = ["#", "Pipeline ID", "Job Status", "Job Duration", "Job Started At", "Job Finished At", "Job Short Commit", "Job Web URL"] - - print() - print("-" * len(job_heading)) - print(job_heading) - print(tabulate.tabulate(table_rows, headers=table_headers, tablefmt="grid")) - - -# Function to filter and print scheduled jobs -def list_scheduled_jobs(project_id, job_name=""): - # Create a GitLab client - gl = gitlab.Gitlab(url=gitlab_url, private_token=private_token) - - project = gl.projects.get(project_id) - schedules = project.pipelineschedules.list(all=True) - filtered_schedules = [schedule for schedule in schedules if schedule.description == schedule_name] - assert len(filtered_schedules) == 1, f"Found {len(filtered_schedules)} schedules with name {schedule_name}" - - # Fetch detailed pipeline information - table_rows = [] - pipelines = filtered_schedules[0].pipelines.list(all=True)[::-1] - - table_rows_num = pipeline_limit_num if len(pipelines) > pipeline_limit_num else len(pipelines) - - for i, pipeline in enumerate(pipelines): - if i >= pipeline_limit_num: - break - pipeline = project.pipelines.get(pipeline.id) - - if filter_pipeline_condition(pipeline): - print(f"Processing {i + 1}/{table_rows_num}") - pipeline_details = collect_pipeline_details(pipeline) - - # List jobs for the scheduled pipeline - jobs = pipeline.jobs.list(all=True) - for job in jobs: - if filter_job_condition(job, job_name): - job_details = collect_job_details(job) - - table_row = [i + 1, pipeline_details["id"], job_details["status"], job_details["duration"], job_details["started_at"], job_details["finished_at"], job_details["short_commit"], job_details["web_url"]] - table_rows.append(table_row) - - print_job_history_table(table_rows) - - -list_scheduled_jobs(project_id, job_name)