MCPcopy Create free account
hub / github.com/pytorch/pytorch / test_basic

Method test_basic

test/jit/test_script_profile.py:43–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41class TestScriptProfile(JitTestCase):
42
43 def test_basic(self):
44 seq = torch.jit.script(Sequence())
45 p = torch.jit._ScriptProfile()
46 p.enable()
47 seq(torch.rand((10, 100)))
48 p.disable()
49 self.assertNotEqual(p.dump_string(), "")
50
51 def test_script(self):
52 seq = Sequence()

Callers

nothing calls this directly

Calls 7

seqFunction · 0.85
assertNotEqualMethod · 0.80
SequenceClass · 0.70
enableMethod · 0.45
randMethod · 0.45
disableMethod · 0.45
dump_stringMethod · 0.45

Tested by

no test coverage detected