MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / Marker

Class Marker

tools/Polygraphy/tests/test_examples.py:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33class Marker:
34 def __init__(self, matches_start_func=None, matches_end_func=None):
35 self.matches_start = util.default(matches_start_func, lambda line: line == self.start)
36 self.matches_end = util.default(matches_end_func, lambda line: line == self.end)
37
38 @staticmethod
39 def from_name(name):
40 return Marker(
41 matches_start_func=lambda line: line == f"<!-- Polygraphy Test: {name} Start -->",
42 matches_end_func=lambda line: line == f"<!-- Polygraphy Test: {name} End -->",
43 )
44
45
46VALID_MARKERS = {

Callers 2

from_nameMethod · 0.85
test_examples.pyFile · 0.85

Calls

no outgoing calls

Tested by 1

from_nameMethod · 0.68