Skip to content

Arm backend: Remove logger.setLevel #10103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion backends/arm/_passes/cast_int64_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from torch._export.utils import is_buffer

logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)


class CastInt64BuffersToInt32Pass(ExportPass):
Expand Down
6 changes: 0 additions & 6 deletions backends/arm/arm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@
# JIT compiler flows.
#

import logging

from typing import List, Optional

from executorch.backends.arm.tosa_specification import TosaSpecification

from executorch.exir.backend.compile_spec_schema import CompileSpec


logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)


class ArmCompileSpecBuilder:
def __init__(self):
self.compile_spec: List[CompileSpec] = []
Expand Down
1 change: 0 additions & 1 deletion backends/arm/operator_support/right_shift_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from executorch.exir.dialects._ops import ops as exir_ops

logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)


@register_tosa_support_check
Expand Down
1 change: 0 additions & 1 deletion backends/arm/operator_support/slice_copy_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from executorch.exir.dialects._ops import ops as exir_ops

logger = logging.getLogger(__name__)
logger.setLevel(logging.WARNING)


@register_tosa_support_check
Expand Down
6 changes: 0 additions & 6 deletions backends/arm/test/misc/test_debug_feats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import os
import shutil
import tempfile
Expand All @@ -15,9 +14,6 @@

from executorch.backends.arm.test.tester.arm_tester import ArmTester

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


class Linear(torch.nn.Module):
def __init__(
Expand Down Expand Up @@ -205,7 +201,6 @@ def test_collate_tosa_BI_tests(self):


def test_dump_tosa_ops(caplog):
caplog.set_level(logging.INFO)
model = Linear(20, 30)
(
ArmTester(
Expand All @@ -222,7 +217,6 @@ def test_dump_tosa_ops(caplog):


def test_fail_dump_tosa_ops(caplog):
caplog.set_level(logging.INFO)

class Add(torch.nn.Module):
def forward(self, x):
Expand Down
5 changes: 0 additions & 5 deletions backends/arm/test/models/test_conformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

import torch
Expand All @@ -14,10 +13,6 @@
from torchaudio.models import Conformer


logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


def get_test_inputs(dim, lengths, num_examples):
return (torch.rand(num_examples, int(lengths.max()), dim), lengths)

Expand Down
1 change: 0 additions & 1 deletion backends/arm/test/models/test_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
sys.path.append(project_dir)

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


class TestLlama(unittest.TestCase):
Expand Down
5 changes: 0 additions & 5 deletions backends/arm/test/models/test_w2l_arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest
from typing import Tuple

Expand All @@ -19,10 +18,6 @@
from torchaudio import models


logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


def get_test_inputs(batch_size, num_features, input_frames):
return (torch.randn(batch_size, num_features, input_frames),)

Expand Down
3 changes: 0 additions & 3 deletions backends/arm/test/ops/test_batch_norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Tuple
Expand All @@ -15,8 +14,6 @@
from executorch.backends.arm.test.tester.arm_tester import ArmTester
from parameterized import parameterized

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

test_data_suite = [
# (test_name, test_data, [num_features, affine, track_running_stats, weight, bias, running_mean, running_var,] )
Expand Down
3 changes: 0 additions & 3 deletions backends/arm/test/ops/test_conv_combos.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Tuple
Expand All @@ -18,8 +17,6 @@
from parameterized import parameterized
from torch.nn.parameter import Parameter

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

"""
This file contain unit tests where conv are combined with other ops.
Expand Down
3 changes: 0 additions & 3 deletions backends/arm/test/ops/test_div.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Optional, Tuple, Union
Expand All @@ -17,8 +16,6 @@
from executorch.backends.arm.test.tester.arm_tester import ArmTester
from parameterized import parameterized

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

test_data_suite = [
# (test_name, input, other, rounding_mode) See torch.div() for info
Expand Down
4 changes: 0 additions & 4 deletions backends/arm/test/ops/test_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Tuple
Expand All @@ -19,9 +18,6 @@
from executorch.exir.backend.compile_spec_schema import CompileSpec
from parameterized import parameterized

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


test_data_suite_rank1 = [
# (test_name, test_data, out_features, has_bias)
Expand Down
3 changes: 0 additions & 3 deletions backends/arm/test/ops/test_max_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Tuple
Expand All @@ -26,8 +25,6 @@
from executorch.exir.backend.backend_details import CompileSpec
from parameterized import parameterized

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

test_data_suite = [
# (test_name, test_data, [kernel_size, stride, padding])
Expand Down
6 changes: 1 addition & 5 deletions backends/arm/test/ops/test_sigmoid.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# Copyright 2024 Arm Limited and/or its affiliates.
# All rights reserved.
# Copyright 2024-2025 Arm Limited and/or its affiliates.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

import logging
import unittest

from typing import Tuple
Expand All @@ -16,9 +15,6 @@
from executorch.exir.backend.compile_spec_schema import CompileSpec
from parameterized import parameterized

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


test_data_suite = [
# (test_name, test_data)
Expand Down
2 changes: 0 additions & 2 deletions backends/arm/test/runner_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import numpy as np
import torch

logger = logging.getLogger(__name__)
try:
import tosa_tools.v0_80.tosa_reference_model as tosa_reference_model
except ImportError:
Expand All @@ -37,7 +36,6 @@
from tosa_tools.v0_80.tosa import TosaGraph

logger = logging.getLogger(__name__)
logger.setLevel(logging.CRITICAL)

# Copied from PyTorch.
# From torch/testing/_internal/common_utils.py:torch_to_numpy_dtype_dict
Expand Down
1 change: 1 addition & 0 deletions backends/arm/util/arm_model_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

# Logger for outputting progress for longer running evaluation
logger = logging.getLogger(__name__)
# Explicitly set logging level: MLETORCH-893
logger.setLevel(logging.INFO)


Expand Down
Loading