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

Function test_if_then_else

tests/python/tirx/transform/test_stmt_functor.py:845–882  ·  view source on GitHub ↗

Test if-then-else statement.

()

Source from the content-addressed store, hash-verified

843
844
845def test_if_then_else():
846 """Test if-then-else statement."""
847 if_then_else = create_test_statements()["if_then_else"]
848 basic_check(
849 if_then_else,
850 "\n".join(
851 [
852 "IfThenElse",
853 "\tLT",
854 "\t\tVar",
855 "\t\tIntImm",
856 "\tEvaluate",
857 "\t\tAdd",
858 "\t\t\tVar",
859 "\t\t\tIntImm",
860 "\tEvaluate",
861 "\t\tAdd",
862 "\t\t\tVar",
863 "\t\t\tIntImm",
864 ]
865 ),
866 "\n".join(
867 [
868 "Var",
869 "IntImm",
870 "LT",
871 "Var",
872 "IntImm",
873 "Add",
874 "Evaluate",
875 "Var",
876 "IntImm",
877 "Add",
878 "Evaluate",
879 "IfThenElse",
880 ]
881 ),
882 )
883
884
885def test_for_with_break_continue():

Callers

nothing calls this directly

Calls 3

create_test_statementsFunction · 0.70
basic_checkFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…