• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Owner(s): ["module: intel"]
2
3import torch
4import unittest
5from torch.testing._internal.common_utils import TestCase, run_tests, load_tests
6
7# load_tests from common_utils is used to automatically filter tests for
8# sharding on sandcastle. This line silences flake warnings
9load_tests = load_tests
10
11@unittest.skipIf(not torch.profiler.itt.is_available(), "ITT is required")
12class TestItt(TestCase):
13    def test_itt(self):
14        # Just making sure we can see the symbols
15        torch.profiler.itt.range_push("foo")
16        torch.profiler.itt.mark("bar")
17        torch.profiler.itt.range_pop()
18
19if __name__ == '__main__':
20    run_tests()
21