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

Method test_script

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

Source from the content-addressed store, hash-verified

49 self.assertNotEqual(p.dump_string(), "")
50
51 def test_script(self):
52 seq = Sequence()
53
54 @torch.jit.script
55 def fn():
56 p = torch.jit._ScriptProfile()
57 p.enable()
58 _ = seq(torch.rand((10, 100)))
59 p.disable()
60 return p
61
62 self.assertNotEqual(fn().dump_string(), "")
63
64 def test_multi(self):
65 seq = torch.jit.script(Sequence())

Callers

nothing calls this directly

Calls 4

assertNotEqualMethod · 0.80
SequenceClass · 0.70
fnFunction · 0.50
dump_stringMethod · 0.45

Tested by

no test coverage detected