MCPcopy Index your code
hub / github.com/apache/tvm / validate_debug_dir_path

Function validate_debug_dir_path

tests/python/support/test_util.py:26–33  ·  view source on GitHub ↗

Validate the dir path of debugging

(temp_dir, expected_basename)

Source from the content-addressed store, hash-verified

24
25
26def validate_debug_dir_path(temp_dir, expected_basename):
27 """Validate the dir path of debugging"""
28 dirname, basename = os.path.split(temp_dir.temp_dir)
29 assert basename == expected_basename, f"unexpected basename: {basename}"
30
31 parent_dir = os.path.basename(dirname)
32 create_time = datetime.datetime.strptime(parent_dir.split("___", 1)[0], "%Y-%m-%dT%H-%M-%S")
33 assert abs(datetime.datetime.now() - create_time) < datetime.timedelta(seconds=60)
34
35
36def test_tempdir():

Callers 1

test_tempdirFunction · 0.85

Calls 2

absFunction · 0.50
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…