Skip to content

Commit

Permalink
Fix NVFuserTest.AvoidCachingSliceInput.
Browse files Browse the repository at this point in the history
  • Loading branch information
wujingyue committed Aug 23, 2024
1 parent e9fae66 commit 7921e63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/cpp/test_gpu3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <kernel_ir_dispatch.h>
#include <logical_domain_map.h>
#include <ops/all_ops.h>
#include <preseg_passes/mark_aliases_prepare.h>
#include <preseg_passes/optimization_pass.h>
#include <scheduler/all_schedulers.h>
#include <scheduler/reduction_utils.h>
#include <scheduler/utils.h>
Expand Down Expand Up @@ -7805,6 +7807,12 @@ TEST_F(NVFuserTest, AvoidCachingSliceInput) {
auto fusion = std::make_unique<Fusion>();
FusionGuard fg(fusion.get());

// Avoid `slice`s from being bookended. This test is to exercise kernel
// caching when a `SliceOp` is applied on a segment input. Bookending
// `slice`s would defeat that purpose.
preseg_passes::OptimizationPassGuard<preseg_passes::MarkAliasesPreparePass>
optimization_guard(false);

// values to trigger the original bug.
const int64_t eight = 8;
const int64_t twenty = 20;
Expand Down

0 comments on commit 7921e63

Please sign in to comment.