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

Function test_binding_block

tests/python/relax/test_expr_functor.py:458–496  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

456
457
458def test_binding_block():
459 bb._begin_binding_block()
460 gv0 = bb.emit(relax.op.add(x, y))
461 gv1 = bb.match_cast(y, R.Tensor([m, n], "float32"))
462 b0 = bb._end_block()
463 basic_check(
464 b0,
465 "\n".join(
466 [
467 "BindingBlock",
468 "\tVarBinding",
469 "\t\tCall",
470 "\t\t\tOp",
471 "\t\t\tVar",
472 "\t\t\tVar",
473 "\t\tVarDef",
474 "\tMatchCast",
475 "\t\tVarDef",
476 "\t\tVar",
477 ]
478 ),
479 "\n".join(
480 [
481 "Op",
482 "Var",
483 "Var",
484 "Call",
485 "ShapeExpr",
486 "VarDef",
487 "VarBinding",
488 "Var",
489 "ShapeExpr",
490 "ShapeExpr",
491 "VarDef",
492 "MatchCast",
493 "BindingBlock",
494 ]
495 ),
496 )
497
498
499def test_dataflow_block():

Callers

nothing calls this directly

Calls 8

_begin_binding_blockMethod · 0.80
match_castMethod · 0.80
TensorMethod · 0.80
_end_blockMethod · 0.80
basic_checkFunction · 0.70
emitMethod · 0.45
addMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…