mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
This PR enables `PLW0127` in ruff, which checks self-assignment of variables with the form `var=var`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165851 Approved by: https://github.com/Lucaskabela
21 lines
658 B
Python
21 lines
658 B
Python
# Owner(s): ["module: intel"]
|
|
|
|
import torch
|
|
import unittest
|
|
from torch.testing._internal.common_utils import TestCase, run_tests, load_tests
|
|
|
|
# load_tests from common_utils is used to automatically filter tests for
|
|
# sharding on sandcastle. This line silences flake warnings
|
|
load_tests = load_tests # noqa: PLW0127
|
|
|
|
@unittest.skipIf(not torch.profiler.itt.is_available(), "ITT is required")
|
|
class TestItt(TestCase):
|
|
def test_itt(self):
|
|
# Just making sure we can see the symbols
|
|
torch.profiler.itt.range_push("foo")
|
|
torch.profiler.itt.mark("bar")
|
|
torch.profiler.itt.range_pop()
|
|
|
|
if __name__ == '__main__':
|
|
run_tests()
|