NVIDIA/Fuser

`getExprsBetween` is not getting expressions between vals

Open

#2.383 aberto em 11 de jun. de 2024

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)C++ (80 forks)github user discovery
Triagegood first issue

Métricas do repositório

Stars
 (392 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

TEST_F(IterVisitorTest, ExprsBetween) {
  Fusion fusion;
  FusionGuard fg(&fusion);

  TensorView* tv0 = makeSymbolicTensor(1);
  TensorView* tv1 = set(tv0);
  TensorView* tv2 = set(tv1);
  TensorView* tv3 = set(tv2);
  TensorView* tv4 = set(tv3);

  fusion.addInput(tv0);
  fusion.addOutput(tv4);

  auto exprs0 = StmtSort::getExprsBetween({tv2}, {tv3});
  auto exprs1 = StmtSort::getExprsBetween({tv3}, {tv2});

  std::cout << "exprs0: " << ir_utils::toString(exprs0) << std::endl;
  std::cout << "exprs1: " << ir_utils::toString(exprs1) << std::endl;

  EXPECT_EQ(exprs0, std::vector<Expr*>{tv3->definition()});
  EXPECT_EQ(exprs1, std::vector<Expr*>{});
}

I am expecting exprs1 to be empty, but getting:

exprs1:
T1_l[ iS1{i0} ]
   = Set( T0_g[ iS0{i0} ], cache_op=Streaming )
T2_l[ iS2{i0} ]
   = Set( T1_l[ iS1{i0} ], cache_op=Streaming )

Guia do colaborador