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

Function test_dataflow_block

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

Source from the content-addressed store, hash-verified

497
498
499def test_dataflow_block():
500 bb._begin_dataflow_block()
501 lv0 = bb.emit(relax.op.add(x, y))
502 gv1 = bb.match_cast(y, R.Tensor([m, n], "float32"))
503 b0 = bb._end_block()
504 basic_check(
505 b0,
506 "\n".join(
507 [
508 "DataflowBlock",
509 "\tVarBinding",
510 "\t\tCall",
511 "\t\t\tOp",
512 "\t\t\tVar",
513 "\t\t\tVar",
514 "\t\tDataflowVarDef",
515 "\tMatchCast",
516 "\t\tDataflowVarDef",
517 "\t\tVar",
518 ]
519 ),
520 "\n".join(
521 [
522 "Op",
523 "Var",
524 "Var",
525 "Call",
526 "ShapeExpr",
527 "DataflowVarDef",
528 "VarBinding",
529 "Var",
530 "ShapeExpr",
531 "ShapeExpr",
532 "DataflowVarDef",
533 "MatchCast",
534 "DataflowBlock",
535 ]
536 ),
537 )
538
539
540def test_function():

Callers

nothing calls this directly

Calls 8

_begin_dataflow_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…