MCPcopy Create free account
hub / github.com/apache/tvm / strip_whitespace

Function strip_whitespace

tests/python/relax/test_ast_printer.py:36–40  ·  view source on GitHub ↗

Remove all whitespace to avoid reasoning about newlines and indents

(text: str)

Source from the content-addressed store, hash-verified

34
35
36def strip_whitespace(text: str) -> str:
37 """
38 Remove all whitespace to avoid reasoning about newlines and indents
39 """
40 return re.sub(r"\s", "", text)
41
42
43def normalize(func: rx.Function) -> rx.Function:

Callers 14

assert_fieldsFunction · 0.85
test_seq_exprFunction · 0.85
test_typesFunction · 0.85
test_struct_infoFunction · 0.85
test_call_packedFunction · 0.85
test_call_tirFunction · 0.85
test_call_dps_packedFunction · 0.85
test_operatorsFunction · 0.85
test_ifFunction · 0.85
test_tuple_get_itemFunction · 0.85
test_prim_valueFunction · 0.85

Calls 1

subMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…