You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, inlining uses unmappable dims in MaxPosCalculator to avoid inlining into illegal dims. However, the unmappable dims in MaxPosCalculator only contains root domains, which is a mistake and can result wrong CA position being set. See the following example:
TEST_F(NVFuserTest, FusionUnmappableLeaf_CUDA) {
Fusion fusion;
FusionGuard fg(&fusion);
TensorView* tv0 = makeConcreteTensor({4});
fusion.addInput(tv0);
auto tv1 = sin(tv0);
auto tv2 = cos(tv1);
auto tv3 = exp(tv2);
auto tv4 = add(tv1, tv3);
fusion.addOutput(tv4);
tv3->split(0, 2);
inlineMost();
// For old code, use// InlinePropagator ip(tv0, -1, ComputeAtMode::MostInlined);// MaxRootDomainInfoSpanningTree(tv0).traverse(&ip);auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0);
at::Tensor input = at::randn({4}, options);
FusionExecutor fe;
fe.compileFusion(&fusion);
auto cg_outputs = fe.runFusion({input});
auto t1 = input.sin();
at::Tensor output_ref = t1 + t1.cos().exp();
testValidate(&fusion, cg_outputs, {input}, {output_ref}, __LINE__, __FILE__);
}
Self assign as one of my upcomming refactoring of MaxPosCalculator should fix this. Will not be high priority because I don't see any scheduler triggers such an error.
🐛 Describe the bug
Currently, inlining uses unmappable dims in
MaxPosCalculator
to avoid inlining into illegal dims. However, the unmappable dims inMaxPosCalculator
only contains root domains, which is a mistake and can result wrong CA position being set. See the following example:Note that this bug is NOT introduced in #2004
Versions
TOT devel
The text was updated successfully, but these errors were encountered: