From 4c044da8f414b4c29916166fb474518b4f3a00d5 Mon Sep 17 00:00:00 2001 From: Naoya Maruyama Date: Fri, 30 Jan 2026 13:38:24 -0800 Subject: [PATCH 1/3] cleanup --- csrc/device_lower/id_model_options.h | 7 +-- csrc/device_lower/lower2device.cpp | 1 - csrc/options.cpp | 1 - csrc/options.h | 1 - tests/cpp/test_abstract_tensor.cpp | 1 - tests/cpp/test_allocation_domain.cpp | 1 - tests/cpp/test_allocation_order_inference.cpp | 1 - tests/cpp/test_argsort.cpp | 1 - tests/cpp/test_bfs.cpp | 1 - tests/cpp/test_circular_buffering.cpp | 14 ----- .../cpp/test_circular_buffering_ping_pong.cpp | 1 - tests/cpp/test_cluster.cpp | 1 - .../test_combined_inner_outer_reduction.cpp | 1 - tests/cpp/test_compute_with.cpp | 1 - tests/cpp/test_contiguity_id_model.cpp | 1 - tests/cpp/test_gather.cpp | 1 - tests/cpp/test_gpu1.cpp | 4 -- tests/cpp/test_gpu2.cpp | 1 - tests/cpp/test_gpu3.cpp | 3 - tests/cpp/test_greedy.cpp | 1 - tests/cpp/test_index_put.cpp | 1 - tests/cpp/test_index_select.cpp | 1 - tests/cpp/test_indexing.cpp | 61 ++----------------- tests/cpp/test_indexing_advanced.cpp | 60 +++++++----------- tests/cpp/test_inlining.cpp | 1 - tests/cpp/test_matmul.cpp | 3 - tests/cpp/test_matmul_scheduler.cpp | 3 - tests/cpp/test_memory.cpp | 4 -- tests/cpp/test_mma.cpp | 4 -- tests/cpp/test_moe.cpp | 1 - tests/cpp/test_move_pad.cpp | 1 - tests/cpp/test_move_repeat_forward.cpp | 1 - tests/cpp/test_move_split_cat.cpp | 1 - tests/cpp/test_outer_reduction.cpp | 1 - tests/cpp/test_persistent_buffer.cpp | 2 - tests/cpp/test_pointwise.cpp | 1 - tests/cpp/test_predicate_elimination.cpp | 1 - tests/cpp/test_reduction.cpp | 1 - tests/cpp/test_reduction_pointwise.cpp | 1 - tests/cpp/test_remove_bcast_squeeze.cpp | 1 - tests/cpp/test_replay.cpp | 1 - tests/cpp/test_reshape.cpp | 2 - tests/cpp/test_resize.cpp | 40 ------------ tests/cpp/test_rope.cpp | 1 - tests/cpp/test_scatter.cpp | 2 - tests/cpp/test_select.cpp | 1 - tests/cpp/test_serial_gridreduce.cpp | 1 - tests/cpp/test_stream.cpp | 4 +- tests/cpp/test_topk.cpp | 1 - tests/cpp/test_transpose.cpp | 2 - tests/cpp/test_unary.cpp | 1 - tests/cpp/test_vectorization.cpp | 3 - tests/cpp/test_welford.cpp | 1 - tests/cpp/utils.cpp | 1 - tests/cpp/utils.h | 2 - 55 files changed, 28 insertions(+), 229 deletions(-) diff --git a/csrc/device_lower/id_model_options.h b/csrc/device_lower/id_model_options.h index ae1ceed5be3..5717e98f40a 100644 --- a/csrc/device_lower/id_model_options.h +++ b/csrc/device_lower/id_model_options.h @@ -16,9 +16,6 @@ namespace nvfuser { class IdModelOptions { public: - IdModelOptions() - : tensor_indexer_enabled_(isOptionEnabled(EnableOption::IdModel)) {} - void setTensorIndexer(bool b) { tensor_indexer_enabled_ = b; } @@ -36,8 +33,8 @@ class IdModelOptions { } private: - // Enable TensorIndexer - bool tensor_indexer_enabled_ = false; + // Enable TensorIndexer by default + bool tensor_indexer_enabled_ = true; }; } // namespace nvfuser diff --git a/csrc/device_lower/lower2device.cpp b/csrc/device_lower/lower2device.cpp index e5e395806e4..5b3a0c49b68 100644 --- a/csrc/device_lower/lower2device.cpp +++ b/csrc/device_lower/lower2device.cpp @@ -295,7 +295,6 @@ namespace { // given Fusion IdModelOptions getIdModelOptions(Fusion* fusion) { IdModelOptions options; - options.setTensorIndexer(true); // If not supported, disable use of TensorIndexer by default. It is // still used if explicitly opted-in (see, for example, diff --git a/csrc/options.cpp b/csrc/options.cpp index 36af91a63f9..6d587e35afd 100644 --- a/csrc/options.cpp +++ b/csrc/options.cpp @@ -162,7 +162,6 @@ const std::unordered_map& getEnableOptions() { {"cutlass_scheduler", EnableOption::CutlassScheduler}, {"fuse_matmul", EnableOption::FuseMatmul}, {"fuse_multiple_matmuls", EnableOption::FuseMultipleMatmuls}, - {"id_model", EnableOption::IdModel}, {"id_model_extra_validation", EnableOption::IdModelExtraValidation}, {"io_to_lower_precision", EnableOption::IoToLowerPrecision}, {"kernel_db", EnableOption::KernelDb}, diff --git a/csrc/options.h b/csrc/options.h index 6d08ad0f041..4c72c757460 100644 --- a/csrc/options.h +++ b/csrc/options.h @@ -103,7 +103,6 @@ enum class EnableOption { CutlassScheduler, //! Enable the CUTLASS scheduler and executor FuseMatmul, //! Enable automatic fusion of matmul and linear ops FuseMultipleMatmuls, //! Allow fusing more than one matmul in a single kernel - IdModel, //! Enable IdModel IdModelExtraValidation, //! Enable extra error checking when building IdModel IoToLowerPrecision, //! Enable castInputOutputToLowerPrecision. #1889 explains //! why we disabled it by default. diff --git a/tests/cpp/test_abstract_tensor.cpp b/tests/cpp/test_abstract_tensor.cpp index 8b713a170bb..cbdc3897eab 100644 --- a/tests/cpp/test_abstract_tensor.cpp +++ b/tests/cpp/test_abstract_tensor.cpp @@ -20,7 +20,6 @@ class AbstractTensorTest : public NVFuserTest { void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); fusion_ptr_ = std::make_unique(); fusion_guard_ptr_ = std::make_unique(fusion_ptr_.get()); auto size = IrBuilder::create(16, DataType::Index); diff --git a/tests/cpp/test_allocation_domain.cpp b/tests/cpp/test_allocation_domain.cpp index 9a7928d6f1e..2600fcce7a1 100644 --- a/tests/cpp/test_allocation_domain.cpp +++ b/tests/cpp/test_allocation_domain.cpp @@ -25,7 +25,6 @@ class AllocationDomainTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_allocation_order_inference.cpp b/tests/cpp/test_allocation_order_inference.cpp index 3197b1ddce1..7b6e2096347 100644 --- a/tests/cpp/test_allocation_order_inference.cpp +++ b/tests/cpp/test_allocation_order_inference.cpp @@ -27,7 +27,6 @@ class AllocationOrderInferenceTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_argsort.cpp b/tests/cpp/test_argsort.cpp index b2c5add9b9c..22e8d3e0273 100644 --- a/tests/cpp/test_argsort.cpp +++ b/tests/cpp/test_argsort.cpp @@ -26,7 +26,6 @@ class ArgsortTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_bfs.cpp b/tests/cpp/test_bfs.cpp index 62b43e2e6b6..02352d2928c 100644 --- a/tests/cpp/test_bfs.cpp +++ b/tests/cpp/test_bfs.cpp @@ -865,7 +865,6 @@ TEST_F(FindAllExprsTest, Rotation) { std::vector shape({16, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); diff --git a/tests/cpp/test_circular_buffering.cpp b/tests/cpp/test_circular_buffering.cpp index fb2d5299908..53eb862eacc 100644 --- a/tests/cpp/test_circular_buffering.cpp +++ b/tests/cpp/test_circular_buffering.cpp @@ -22,8 +22,6 @@ TEST_F(NVFuserTest, BarSyncWarpSpecializedPointwise) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - int64_t number_of_stages = 4; int64_t prefetch_distance = 1; int64_t tensor_outer_dim = 128; @@ -99,8 +97,6 @@ TEST_F(NVFuserTest, RegisterSharingCircularBufferingPointwiseCustom) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - int64_t number_of_stages = 4; int64_t prefetch_distance = 1; int64_t tensor_outer_dim = 128; @@ -183,8 +179,6 @@ TEST_F(NVFuserTest, RegisterSharingCircularBufferingPointwiseNested) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - int64_t number_of_stages = 4; int64_t prefetch_distance = 1; int64_t tensor_outer_dim = 128; @@ -267,7 +261,6 @@ class CircularBufferingTest : public NVFuserFixtureParamTest { number_of_stages = std::get<0>(GetParam()); prefetch_distance = std::get<1>(GetParam()); NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -1101,7 +1094,6 @@ class TmaCircularBufferingTest // NOTE: Multiple of 16 required for inner dimension NVF_ERROR(tensor_inner_dim % 16 == 0); NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } bool testEnablesWarpSpecialization() { @@ -1220,8 +1212,6 @@ TEST_F(NVFuserTest, ElectSyncCompatibility) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - TensorView* input = makeContigTensor(3); fusion->addInput(input); TensorView* output = set(input); @@ -2414,8 +2404,6 @@ TEST_F(NVFuserTest, TmaRegisterSharingDynamicShapesExpectFail) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - auto tv0 = makeContigTensor(2); fusion->addInput(tv0); @@ -2478,8 +2466,6 @@ TEST_P(TmaRegisterSharing, CtaShapeShmoo) { std::unique_ptr fusion = std::make_unique(); FusionGuard fg(fusion.get()); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - auto tv0 = makeContigTensor(2); fusion->addInput(tv0); diff --git a/tests/cpp/test_circular_buffering_ping_pong.cpp b/tests/cpp/test_circular_buffering_ping_pong.cpp index 4d6c6567a12..be5d79a8fb6 100644 --- a/tests/cpp/test_circular_buffering_ping_pong.cpp +++ b/tests/cpp/test_circular_buffering_ping_pong.cpp @@ -331,7 +331,6 @@ TEST_P(SiblingPingPongCircularBuffering, TwoTmaLoads) { auto [use_id_model, stage_slice_position] = GetParam(); if (use_id_model) { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } std::unique_ptr fusion = std::make_unique(); diff --git a/tests/cpp/test_cluster.cpp b/tests/cpp/test_cluster.cpp index 342f6b16859..0967a61975c 100644 --- a/tests/cpp/test_cluster.cpp +++ b/tests/cpp/test_cluster.cpp @@ -31,7 +31,6 @@ class ClusterReductionTest : public NVFuserTest, protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); NVFUSER_TEST_CUDA_ARCH_GUARD(9, 0); } }; diff --git a/tests/cpp/test_combined_inner_outer_reduction.cpp b/tests/cpp/test_combined_inner_outer_reduction.cpp index c58e386542e..9f7cfad8e29 100644 --- a/tests/cpp/test_combined_inner_outer_reduction.cpp +++ b/tests/cpp/test_combined_inner_outer_reduction.cpp @@ -45,7 +45,6 @@ class CombinedSchedulerTest protected: void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_compute_with.cpp b/tests/cpp/test_compute_with.cpp index 49ba26457ed..35669341e76 100644 --- a/tests/cpp/test_compute_with.cpp +++ b/tests/cpp/test_compute_with.cpp @@ -56,7 +56,6 @@ using namespace at::indexing; class ComputeWithTest : public NVFuserTest { protected: void SetUp() override { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); NVFuserTest::SetUp(); } }; diff --git a/tests/cpp/test_contiguity_id_model.cpp b/tests/cpp/test_contiguity_id_model.cpp index 1adf24500db..ab003c00e8c 100644 --- a/tests/cpp/test_contiguity_id_model.cpp +++ b/tests/cpp/test_contiguity_id_model.cpp @@ -26,7 +26,6 @@ class ContigIDGroupsTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } // Helper to construct a simple backward path for testing diff --git a/tests/cpp/test_gather.cpp b/tests/cpp/test_gather.cpp index 0924b33a70b..b041ec7b523 100644 --- a/tests/cpp/test_gather.cpp +++ b/tests/cpp/test_gather.cpp @@ -30,7 +30,6 @@ class GatherTest : public NVFuserTest { void SetUp() override { // To make the tests using std::rand deterministic std::srand(0); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_gpu1.cpp b/tests/cpp/test_gpu1.cpp index aa9ae405393..de9686f1f7c 100644 --- a/tests/cpp/test_gpu1.cpp +++ b/tests/cpp/test_gpu1.cpp @@ -59,7 +59,6 @@ class Gpu1Test : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -2803,7 +2802,6 @@ class Fp4CastTest : public NVFuserTest, public: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); std::tie(dtype_highp, vectorization_factor) = GetParam(); NVFUSER_TEST_CUDA_ARCH_GUARD(10, 0); } @@ -3008,7 +3006,6 @@ class AdvancedDtypeTest : public NVFuserFixtureParamTest { bool use_dynamic_shape; void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); use_dynamic_shape = GetParam(); } }; @@ -3086,7 +3083,6 @@ class Float4E2m1ManualScheduleTestAllArch bool dynamic_shape; void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); std::tie(vectorize_factor, dynamic_shape) = GetParam(); } }; diff --git a/tests/cpp/test_gpu2.cpp b/tests/cpp/test_gpu2.cpp index dc7a9f7f527..92de2a3d71e 100644 --- a/tests/cpp/test_gpu2.cpp +++ b/tests/cpp/test_gpu2.cpp @@ -60,7 +60,6 @@ class Gpu2Test : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_gpu3.cpp b/tests/cpp/test_gpu3.cpp index e2da25316dd..8c840d780e5 100644 --- a/tests/cpp/test_gpu3.cpp +++ b/tests/cpp/test_gpu3.cpp @@ -65,7 +65,6 @@ class Gpu3Test : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -3400,8 +3399,6 @@ TEST_F(Gpu3Test, FusionIssueRepro1844_CUDA) { } TEST_F(Gpu3Test, FusionInsertMagicZero1_CUDA) { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - Fusion fusion; FusionGuard fg(&fusion); diff --git a/tests/cpp/test_greedy.cpp b/tests/cpp/test_greedy.cpp index 1f7c433e1d0..27f25b302bf 100644 --- a/tests/cpp/test_greedy.cpp +++ b/tests/cpp/test_greedy.cpp @@ -27,7 +27,6 @@ class GreedySchedulerTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_index_put.cpp b/tests/cpp/test_index_put.cpp index dd175c91166..e3fefa043d6 100644 --- a/tests/cpp/test_index_put.cpp +++ b/tests/cpp/test_index_put.cpp @@ -42,7 +42,6 @@ std::vector generateSizeOneParams() { class IndexPut : public NVFuserFixtureParamTest { protected: void SetUp() override { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); NVFuserTest::SetUp(); } }; diff --git a/tests/cpp/test_index_select.cpp b/tests/cpp/test_index_select.cpp index 1a774a2da14..5e65496e7f7 100644 --- a/tests/cpp/test_index_select.cpp +++ b/tests/cpp/test_index_select.cpp @@ -74,7 +74,6 @@ void checkIndexSelectVectorization( class IndexSelectTest : public NVFuserTest { protected: void SetUp() override { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); NVFuserTest::SetUp(); } }; diff --git a/tests/cpp/test_indexing.cpp b/tests/cpp/test_indexing.cpp index fe5e14a3760..5ca0ee83325 100644 --- a/tests/cpp/test_indexing.cpp +++ b/tests/cpp/test_indexing.cpp @@ -32,7 +32,7 @@ namespace nvfuser { using IndexingTest = NVFuserTest; -using PredicateIndexingTest = NVFuserFixtureParamTest; +using PredicateIndexingTest = NVFuserTest; using ContigIndexingTest = NVFuserTest; using ContigPredicateIndexingTest = NVFuserTest; @@ -282,8 +282,6 @@ class IndexValidator : public kir::IrVisitor { bool enable_contig_indexing, Args... args) { EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set( - EnableOption::IdModel, {"consumer_index", "producer_index"}); // Disable simplifications to make the pattern matching of sameAs work DisableOptionsGuard disable_options_guard; @@ -425,7 +423,6 @@ class PredicateIndexValidator : public kir::IrVisitor { bool enable_contig_indexing, Args... args) { EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // Disable simplifications to make the pattern matching of sameAs work DisableOptionsGuard disable_options_guard; @@ -3095,7 +3092,6 @@ TEST_F(PredicateIndexingTest, DoubleBuffering1) { at::Tensor t0 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3193,7 +3189,6 @@ TEST_F(PredicateIndexingTest, CircularBuffering1) { at::Tensor t0 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3360,7 +3355,6 @@ TEST_F(PredicateIndexingTest, UnrolledCircularBuffering) { at::Tensor t0 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3435,7 +3429,6 @@ TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering1) { at::Tensor t0 = at::randn({99}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3520,7 +3513,6 @@ TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering2) { at::Tensor t0 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3535,7 +3527,7 @@ TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering2) { // tensors should not affect the unswitch predicate, which should // always be generated based on the circular buffered tensor as it has // more restrictive conditions. -TEST_P(PredicateIndexingTest, UnswitchedCircularBuffering3) { +TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering3) { Fusion fusion; FusionGuard fg(&fusion); @@ -3574,11 +3566,7 @@ TEST_P(PredicateIndexingTest, UnswitchedCircularBuffering3) { tv4->axis(1)->parallelize(ParallelType::Unswitch); // Only one of the two inputs is circular buffered - if (GetParam()) { - tv2->circularBuffer(/*number_of_stages=*/3); - } else { - tv3->circularBuffer(/*number_of_stages=*/3); - } + tv2->circularBuffer(/*number_of_stages=*/3); struct GetReference : AbstractGetReference { GetReference(const TensorIndexer& indexer, const IdModel& id_model) @@ -3622,7 +3610,6 @@ TEST_P(PredicateIndexingTest, UnswitchedCircularBuffering3) { at::Tensor t1 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0, t1}); @@ -3631,12 +3618,6 @@ TEST_P(PredicateIndexingTest, UnswitchedCircularBuffering3) { testValidate(&fusion, outputs, {t0, t1}, __LINE__, __FILE__); } -INSTANTIATE_TEST_SUITE_P( - , - PredicateIndexingTest, - testing::Bool(), - testing::PrintToStringParamName()); - // Repro for the issue with unswitched double buffer loops // (https://github.com/NVIDIA/Fuser/issues/2159) TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering4) { @@ -3698,7 +3679,6 @@ TEST_F(PredicateIndexingTest, UnswitchedCircularBuffering4) { // Running this fusion with the legacy indexer would result in an // error if run with compute-sanitizer. EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); auto t0 = at::randn({16}, options); @@ -3790,7 +3770,6 @@ TEST_F(PredicateIndexingTest, NonDivisibleSplit1) { PredicateIndexValidator::validate(&fusion, false); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({999}, options); @@ -3881,7 +3860,6 @@ TEST_F(PredicateIndexingTest, NonDivisibleSplitWithUnswitch) { PredicateIndexValidator::validate(&fusion, false); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({999}, options); @@ -3975,7 +3953,6 @@ TEST_F(PredicateIndexingTest, NonDivisibleSplitWithCircularBuffering) { PredicateIndexValidator::validate(&fusion, false); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({999}, options); @@ -4085,7 +4062,6 @@ TEST_F( PredicateIndexValidator::validate(&fusion, false); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({999}, options); @@ -4098,7 +4074,7 @@ TEST_F( } // Repro of unswitch predicate issue #681 -TEST_P(PredicateIndexingTest, UnswitchPredicateIssueRepro681) { +TEST_F(PredicateIndexingTest, UnswitchPredicateIssueRepro681) { Fusion fusion; FusionGuard fg(&fusion); @@ -4167,13 +4143,6 @@ TEST_P(PredicateIndexingTest, UnswitchPredicateIssueRepro681) { PredicateIndexValidator::validate(&fusion, false); - EnableOptionsGuard enable_options_guard; - if (GetParam()) { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - } else { - EnableOptionsGuard::getCurOptions().unset(EnableOption::IdModel); - } - KernelExecutor ke; ke.compile(&fusion, {t0}); auto outputs = ke.run({t0}); @@ -4331,7 +4300,6 @@ TEST_F(PredicateIndexingTest, NonDivisibleSplitWithUnswitchAndBroadcast) { at::Tensor t1 = at::randn({5, 100}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0, t1}); @@ -4346,8 +4314,6 @@ TEST_F(PredicateIndexingTest, NonDivisibleSplitWithNonLogicalToLoopDomains) { Fusion fusion; FusionGuard fg(&fusion); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - std::vector shape{5, 2}; auto tv0 = makeConcreteTensor(shape); @@ -4564,7 +4530,6 @@ TEST_F(PredicateIndexingTest, UnswitchConsolidationDifferentThreading) { at::Tensor t1 = at::randn({1000}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0, t1}); @@ -4746,7 +4711,6 @@ TEST_F( PredicateIndexingTest, ParallelDimensionPredicateWithUnswitchAndSetLoopDomain) { // EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); Fusion fusion; FusionGuard fg(&fusion); @@ -5242,7 +5206,6 @@ TEST_F(ContigIndexingTest, ConcretizedBroadcastMerge) { IndexValidator::validate(&fusion, true); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); auto t0 = at::randn({5, 6}, options); @@ -5355,7 +5318,6 @@ TEST_F(ContigIndexingTest, Transpose) { IndexValidator::validate(&fusion, true); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); auto t0 = at::randn({100, 100}, options); @@ -5583,7 +5545,6 @@ TEST_F(ContigPredicateIndexingTest, NonDivisibleSplit1) { PredicateIndexValidator::validate(&fusion, true); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({10, 20}, options); @@ -5680,7 +5641,6 @@ TEST_F(IndexingTest, PerDimLogicalIndices) { }; EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); DisableOptionsGuard disable_options_guard; DisableOptionsGuard::getCurOptions().set(DisableOption::ExprSimplify); DisableOptionsGuard::getCurOptions().set(DisableOption::IndexHoist); @@ -5800,7 +5760,6 @@ TEST_F(IndexingTest, ResizeRotation) { const int64_t i0 = 32; EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto zero = fusion.zeroVal(); @@ -5873,7 +5832,6 @@ TEST_F(PredicateIndexingTest, VectorizedResizeRotation) { const int64_t i0 = 32; EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto zero = fusion.zeroVal(); @@ -5976,7 +5934,6 @@ TEST_F(IndexingTest, Issue3505Repro1) { const auto zero = fusion.zeroVal(); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeContigConcreteTensor({i1, i2}); fusion.addInput(tv0); @@ -6019,7 +5976,6 @@ TEST_F(IndexingTest, Issue3505Repro2) { const auto zero = fusion.zeroVal(); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeContigConcreteTensor({i0}); fusion.addInput(tv0); @@ -6058,7 +6014,6 @@ TEST_F(IndexingTest, Issue3505Repro2) { TEST_F(IndexingTest, AlmostExactIndexingUpdate) { EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); Fusion fusion; FusionGuard fg(&fusion); @@ -6131,7 +6086,6 @@ TEST_F(IndexingTest, BroadcastLogicalDomainIndexing) { TEST_F(IndexingTest, Rng) { EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto fusion_ptr = std::make_unique(); auto& fusion = *fusion_ptr; @@ -6164,7 +6118,6 @@ TEST_F(IndexingTest, Rng) { // loop may not be unrolled. TEST_F(IndexingTest, StaticIndexing) { EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto fusion_ptr = std::make_unique(); auto& fusion = *fusion_ptr; @@ -6252,8 +6205,6 @@ TEST_F(PredicateIndexingTest, NonTrivialSizeOneDomain) { PredicateIndexValidator::validate(&fusion, false); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - auto options = at::TensorOptions().dtype(at::kFloat).device(at::kCUDA, 0); at::Tensor t0 = at::randn({8}, options); @@ -6269,8 +6220,6 @@ TEST_F(PredicateIndexingTest, AdditionalNonDivisibleSplit) { Fusion fusion; FusionGuard fg(&fusion); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - auto tv0 = makeContigConcreteTensor({8}); fusion.addInput(tv0); @@ -6322,8 +6271,6 @@ TEST_F(PredicateIndexingTest, AdditionalNonDivisibleSplitAfterDivisibleSplit) { Fusion fusion; FusionGuard fg(&fusion); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - auto tv0 = makeContigConcreteTensor({8}); fusion.addInput(tv0); diff --git a/tests/cpp/test_indexing_advanced.cpp b/tests/cpp/test_indexing_advanced.cpp index 95701753724..87717fc9054 100644 --- a/tests/cpp/test_indexing_advanced.cpp +++ b/tests/cpp/test_indexing_advanced.cpp @@ -18,21 +18,11 @@ namespace nvfuser { -class AdvancedIndexingTest : public NVFuserFixtureParamTest { - protected: - void SetUp() override { - if (GetParam()) { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - } else { - EnableOptionsGuard::getCurOptions().unset(EnableOption::IdModel); - } - } -}; - +using AdvancedIndexingTest = NVFuserTest; using AdvancedIndexingIdModelTest = NVFuserTest; // Repro for issue #1873 -TEST_P(AdvancedIndexingTest, InlineBroadcast) { +TEST_F(AdvancedIndexingTest, InlineBroadcast) { Fusion fusion; FusionGuard fg(&fusion); @@ -68,7 +58,7 @@ TEST_P(AdvancedIndexingTest, InlineBroadcast) { testValidate(&fusion, outputs, {t0, t1}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 1) { +TEST_F(AdvancedIndexingTest, 1) { Fusion fusion; FusionGuard fg(&fusion); @@ -117,7 +107,7 @@ TEST_P(AdvancedIndexingTest, 1) { } // Same as 1 but merge starting from inner most dimension -TEST_P(AdvancedIndexingTest, 2) { +TEST_F(AdvancedIndexingTest, 2) { Fusion fusion; FusionGuard fg(&fusion); @@ -166,7 +156,7 @@ TEST_P(AdvancedIndexingTest, 2) { } // Same compute as 1 and 2 but use a scheduler. -TEST_P(AdvancedIndexingTest, 3) { +TEST_F(AdvancedIndexingTest, 3) { Fusion fusion; FusionGuard fg(&fusion); @@ -191,7 +181,7 @@ TEST_P(AdvancedIndexingTest, 3) { } // Same as 3 but use 3 dimensions and concrete sizes -TEST_P(AdvancedIndexingTest, 4) { +TEST_F(AdvancedIndexingTest, 4) { Fusion fusion; FusionGuard fg(&fusion); @@ -217,7 +207,7 @@ TEST_P(AdvancedIndexingTest, 4) { testValidate(&fusion, cg_outputs, {t0, t1}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 5) { +TEST_F(AdvancedIndexingTest, 5) { Fusion fusion; FusionGuard fg(&fusion); @@ -249,7 +239,7 @@ TEST_P(AdvancedIndexingTest, 5) { testValidate(&fusion, cg_outputs, {t0, t1}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 6) { +TEST_F(AdvancedIndexingTest, 6) { Fusion fusion; FusionGuard fg(&fusion); @@ -287,7 +277,7 @@ TEST_P(AdvancedIndexingTest, 6) { cg_results.heuristic_params->lparams); } -TEST_P(AdvancedIndexingTest, 7) { +TEST_F(AdvancedIndexingTest, 7) { // Might be able to use this one without 6 as the heuristics in 6 may change // and this test is to cover the same issue. Fusion fusion; @@ -333,7 +323,7 @@ TEST_P(AdvancedIndexingTest, 7) { &fusion, cg_outputs, {t0, t1}, {aten_output}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 8) { +TEST_F(AdvancedIndexingTest, 8) { // Same as 7 but with outer splits instead of inner Fusion fusion; FusionGuard fg(&fusion); @@ -379,7 +369,7 @@ TEST_P(AdvancedIndexingTest, 8) { } // Same as 5 but using implicit broadcast -TEST_P(AdvancedIndexingTest, 9) { +TEST_F(AdvancedIndexingTest, 9) { Fusion fusion; FusionGuard fg(&fusion); @@ -409,7 +399,7 @@ TEST_P(AdvancedIndexingTest, 9) { testValidate(&fusion, cg_outputs, {t0, t3}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 10) { +TEST_F(AdvancedIndexingTest, 10) { Fusion fusion; FusionGuard fg(&fusion); @@ -468,7 +458,7 @@ TEST_P(AdvancedIndexingTest, 10) { NVF_CHECK(output_ref.equal(output)); } -TEST_P(AdvancedIndexingTest, 11) { +TEST_F(AdvancedIndexingTest, 11) { Fusion fusion; FusionGuard fg(&fusion); @@ -516,7 +506,7 @@ TEST_P(AdvancedIndexingTest, 11) { testValidate(&fusion, cg_outputs, {t0, t1}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 12) { +TEST_F(AdvancedIndexingTest, 12) { Fusion fusion; FusionGuard fg(&fusion); @@ -554,7 +544,7 @@ TEST_P(AdvancedIndexingTest, 12) { &fusion, cg_outputs, {aten_input}, aten_outputs, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 13) { +TEST_F(AdvancedIndexingTest, 13) { Fusion fusion; FusionGuard fg(&fusion); @@ -600,7 +590,7 @@ TEST_P(AdvancedIndexingTest, 13) { testValidate(&fusion, cg_outputs, {t0, t1, t2}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 14) { +TEST_F(AdvancedIndexingTest, 14) { Fusion fusion; FusionGuard fg(&fusion); @@ -643,7 +633,7 @@ TEST_P(AdvancedIndexingTest, 14) { // This excercises indexing with broadcast root axes. Non-broadcast // axes need to be preferred when propagating index exprs to root // axes. See, e.g., Index::getConsumerIndex_impl. -TEST_P(AdvancedIndexingTest, 15) { +TEST_F(AdvancedIndexingTest, 15) { Fusion fusion; FusionGuard fg(&fusion); @@ -674,7 +664,7 @@ TEST_P(AdvancedIndexingTest, 15) { testValidate(&fusion, cg_outputs, {t0, t3}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 16) { +TEST_F(AdvancedIndexingTest, 16) { Fusion fusion; FusionGuard fg(&fusion); @@ -704,7 +694,7 @@ TEST_P(AdvancedIndexingTest, 16) { testValidate(&fusion, cg_outputs, {t0, t1}, __LINE__, __FILE__); } -TEST_P(AdvancedIndexingTest, 17) { +TEST_F(AdvancedIndexingTest, 17) { Fusion fusion; FusionGuard fg(&fusion); @@ -738,7 +728,7 @@ TEST_P(AdvancedIndexingTest, 17) { } // Repro of issue #2560 -TEST_P(AdvancedIndexingTest, 18) { +TEST_F(AdvancedIndexingTest, 18) { Fusion fusion; FusionGuard fg(&fusion); @@ -781,7 +771,7 @@ TEST_P(AdvancedIndexingTest, 18) { __FILE__); } -TEST_P(AdvancedIndexingTest, 19) { +TEST_F(AdvancedIndexingTest, 19) { Fusion fusion; FusionGuard fg(&fusion); @@ -1088,12 +1078,4 @@ TEST_F(AdvancedIndexingIdModelTest, IndexSplitMerge) { &fusion, cg_outputs, {t0, t1}, {aten_output}, __LINE__, __FILE__); } -INSTANTIATE_TEST_SUITE_P( - , - AdvancedIndexingTest, - testing::Bool(), - [](const testing::TestParamInfo& info) { - return info.param ? "IdModel" : "Legacy"; - }); - } // namespace nvfuser diff --git a/tests/cpp/test_inlining.cpp b/tests/cpp/test_inlining.cpp index ecd71c5bab2..303a8915c67 100644 --- a/tests/cpp/test_inlining.cpp +++ b/tests/cpp/test_inlining.cpp @@ -24,7 +24,6 @@ class InliningTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_matmul.cpp b/tests/cpp/test_matmul.cpp index eb7c2df19ee..14bbd49b8fd 100644 --- a/tests/cpp/test_matmul.cpp +++ b/tests/cpp/test_matmul.cpp @@ -671,8 +671,6 @@ TEST_P(MatmulTestWithLayout, AmpereMatmulRegCircularBuffer) { TEST_F(MatmulTest, MatmulMatmulAmpere) { NVFUSER_TEST_CUDA_ARCH_GUARD(8, 0); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - Fusion fusion; FusionGuard fg(&fusion); int M = 512, N = 256, K1 = 128, K2 = 128; @@ -3485,7 +3483,6 @@ class HopperMatmulTest : public HopperBase { protected: void SetUp() override { HopperBase::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_matmul_scheduler.cpp b/tests/cpp/test_matmul_scheduler.cpp index 8d880308098..86252cf03f4 100644 --- a/tests/cpp/test_matmul_scheduler.cpp +++ b/tests/cpp/test_matmul_scheduler.cpp @@ -2936,7 +2936,6 @@ class AllocationDomainTest void SetUp() override { NVFUSER_TEST_CUDA_ARCH_RANGE_GUARD(9, 0, 10, 0); NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } std::pair getInputTVs( @@ -3389,8 +3388,6 @@ class HopperPlusMatmulSchedulerTest mparams.circular_buffer_options.circular_buffer_smem_write = true; mparams.circular_buffer_options.circular_buffer_smem_read = true; mparams.circular_buffer_options.smem_circular_buffer_stage = 2; - - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } void TearDown() { diff --git a/tests/cpp/test_memory.cpp b/tests/cpp/test_memory.cpp index 8241157a91f..c5f81b1b2f3 100644 --- a/tests/cpp/test_memory.cpp +++ b/tests/cpp/test_memory.cpp @@ -451,8 +451,6 @@ class TMASimpleLdstTest default: NVF_THROW("Invalid dimension"); } - - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -2858,7 +2856,6 @@ class LdMatrixTest : public NVFuserFixtureParamTest { GTEST_SKIP() << "skipping tests on pre-Turing GPUs"; } NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -2912,7 +2909,6 @@ class StMatrixTest : public NVFuserFixtureParamTest { GTEST_SKIP() << "skipping tests on pre-Hopper GPUs"; } NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_mma.cpp b/tests/cpp/test_mma.cpp index 4c33b71b97f..a2ee0abb611 100644 --- a/tests/cpp/test_mma.cpp +++ b/tests/cpp/test_mma.cpp @@ -87,7 +87,6 @@ class MmaTest : public NVFuserFixtureParamTest { } NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -310,7 +309,6 @@ class HopperRS : public HopperBase, void SetUp() override { HopperBase::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); macro = std::get<0>(GetParam()); dtype = std::get<1>(GetParam()); @@ -423,7 +421,6 @@ class HopperRSStmatrix void SetUp() override { HopperBase::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); macro = std::get<0>(GetParam()); dtype = std::get<1>(GetParam()); layout = std::get<2>(GetParam()); @@ -669,7 +666,6 @@ class SSTest : public Base, void SetUp() override { Base::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); macro = std::get<0>(GetParam()); dtype = std::get<1>(GetParam()); diff --git a/tests/cpp/test_moe.cpp b/tests/cpp/test_moe.cpp index 5437fb7e230..54ba95fb00d 100644 --- a/tests/cpp/test_moe.cpp +++ b/tests/cpp/test_moe.cpp @@ -43,7 +43,6 @@ class SgLangMoETest : public NVFuserFixtureParamTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); std::tie( num_experts, num_tokens, topk, rounding_factor, manual_scheduling) = diff --git a/tests/cpp/test_move_pad.cpp b/tests/cpp/test_move_pad.cpp index 56f89349c9f..21837aa0cec 100644 --- a/tests/cpp/test_move_pad.cpp +++ b/tests/cpp/test_move_pad.cpp @@ -22,7 +22,6 @@ class MovePadTest : public NVFuserTest { protected: void SetUp() override { DisableOptionsGuard::getCurOptions().set(DisableOption::ResizeScheduler); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_move_repeat_forward.cpp b/tests/cpp/test_move_repeat_forward.cpp index 01122d2bcd7..421ce454194 100644 --- a/tests/cpp/test_move_repeat_forward.cpp +++ b/tests/cpp/test_move_repeat_forward.cpp @@ -23,7 +23,6 @@ class MoveRepeatForwardTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_move_split_cat.cpp b/tests/cpp/test_move_split_cat.cpp index 2416d4029a1..11ac5bd11b5 100644 --- a/tests/cpp/test_move_split_cat.cpp +++ b/tests/cpp/test_move_split_cat.cpp @@ -22,7 +22,6 @@ class MoveSplitCatTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_outer_reduction.cpp b/tests/cpp/test_outer_reduction.cpp index fdd759462b8..67ce0b78806 100644 --- a/tests/cpp/test_outer_reduction.cpp +++ b/tests/cpp/test_outer_reduction.cpp @@ -37,7 +37,6 @@ class OuterReductionTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_persistent_buffer.cpp b/tests/cpp/test_persistent_buffer.cpp index a33715dbcf0..13484094430 100644 --- a/tests/cpp/test_persistent_buffer.cpp +++ b/tests/cpp/test_persistent_buffer.cpp @@ -32,7 +32,6 @@ class PersistentBufferTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -2193,7 +2192,6 @@ class TmaPersistentTestP void SetUp() override { NVFUSER_TEST_CUDA_ARCH_GUARD(9, 0); NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); EnableOptionsGuard::getCurOptions().set(EnableOption::TmaInnerPersistent); } }; diff --git a/tests/cpp/test_pointwise.cpp b/tests/cpp/test_pointwise.cpp index 5df47ab7f05..f4af8ac9ff7 100644 --- a/tests/cpp/test_pointwise.cpp +++ b/tests/cpp/test_pointwise.cpp @@ -31,7 +31,6 @@ class PointwiseTestP : public NVFuserFixtureParamTest { protected: void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_predicate_elimination.cpp b/tests/cpp/test_predicate_elimination.cpp index e9f2de785df..2306bfe2eaf 100644 --- a/tests/cpp/test_predicate_elimination.cpp +++ b/tests/cpp/test_predicate_elimination.cpp @@ -20,7 +20,6 @@ class PredicateEliminationTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_reduction.cpp b/tests/cpp/test_reduction.cpp index 827418ac232..319a81c65e5 100644 --- a/tests/cpp/test_reduction.cpp +++ b/tests/cpp/test_reduction.cpp @@ -78,7 +78,6 @@ class ReductionTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_reduction_pointwise.cpp b/tests/cpp/test_reduction_pointwise.cpp index 7a47ffe217d..15c9d823a24 100644 --- a/tests/cpp/test_reduction_pointwise.cpp +++ b/tests/cpp/test_reduction_pointwise.cpp @@ -21,7 +21,6 @@ class PointwiseFusedReductionTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_remove_bcast_squeeze.cpp b/tests/cpp/test_remove_bcast_squeeze.cpp index 1eddd52c9cd..fa804749399 100644 --- a/tests/cpp/test_remove_bcast_squeeze.cpp +++ b/tests/cpp/test_remove_bcast_squeeze.cpp @@ -26,7 +26,6 @@ class RemoveBcastSqueezeTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_replay.cpp b/tests/cpp/test_replay.cpp index 65eeb09ee3e..573243b8ded 100644 --- a/tests/cpp/test_replay.cpp +++ b/tests/cpp/test_replay.cpp @@ -29,7 +29,6 @@ class ReplayTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_reshape.cpp b/tests/cpp/test_reshape.cpp index 155c25ecbd7..a40b7cd797b 100644 --- a/tests/cpp/test_reshape.cpp +++ b/tests/cpp/test_reshape.cpp @@ -56,7 +56,6 @@ class ReshapeTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -397,7 +396,6 @@ class ReshapeReduction : public NVFuserFixtureParamTest { protected: void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_resize.cpp b/tests/cpp/test_resize.cpp index b5cf9365983..1a1b747a31f 100644 --- a/tests/cpp/test_resize.cpp +++ b/tests/cpp/test_resize.cpp @@ -88,7 +88,6 @@ TEST_F(ResizeTest, Pad1) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -119,7 +118,6 @@ TEST_F(ResizeTest, Pad2) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -167,7 +165,6 @@ TEST_F(ResizeTest, Pad3) { auto t1 = at::randn(padded_shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0, t1}); @@ -196,7 +193,6 @@ TEST_F(ResizeTest, Pad4) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -246,7 +242,6 @@ TEST_F(ResizeTest, Pad5) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -292,7 +287,6 @@ TEST_F(ResizeTest, Pad6) { auto t1 = at::randn(padded_shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0, t1}); @@ -338,7 +332,6 @@ TEST_F(ResizeTest, Pad7) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -411,7 +404,6 @@ TEST_F(ResizeTest, PadScheduler1) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs({t0}); @@ -445,7 +437,6 @@ TEST_F(ResizeTest, PadScheduler2) { auto t1 = at::randn(padded_shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion_ptr)); auto cg_outputs = executor_cache.runFusionWithInputs({t0, t1}); @@ -521,7 +512,6 @@ TEST_F(ResizeTest, PadScheduler4) { std::vector pad_extents{1, 1}; EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs({t0, 1, 1}); @@ -556,7 +546,6 @@ TEST_F(ResizeTest, PadBroadcastInput) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs({t0}); @@ -1396,7 +1385,6 @@ TEST_F(ResizeTest, PadReduceScheduler1) { } EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion_ptr)); auto cg_outputs = executor_cache.runFusionWithInputs(inputs); @@ -1686,7 +1674,6 @@ TEST_F(ResizeTest, PadWithValue) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -1720,7 +1707,6 @@ TEST_F(ResizeTest, PadToEmptyTensor) { auto t0 = at::randn(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs({t0}); @@ -1751,7 +1737,6 @@ TEST_F(ResizeTest, PadHalfWithDoubleValue) { auto t0 = at::ones(shape, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -2357,7 +2342,6 @@ TEST_F(ResizeTest, ResizePadToBroadcastStatic) { auto t1 = at::randn(t1_size, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs({t0, t1}); @@ -2424,7 +2408,6 @@ TEST_F(ResizeTest, ResizePadToBroadcastDynamic) { } EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion)); auto cg_outputs = executor_cache.runFusionWithInputs(inputs); @@ -2468,7 +2451,6 @@ TEST_F(ResizeTest, ResizePadToBroadcastIssue596) { auto t1 = at::randn({3}, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelArgumentHolder args({t0, t1}); FusionKernelRuntime runtime(std::move(fusion), args); @@ -3021,7 +3003,6 @@ TEST_F(ResizeTest, ReshapeToPad) { fusion.addOutput(tv2); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion_ptr)); @@ -3193,7 +3174,6 @@ TEST_F(ResizeTest, PadExpandedEmpty) { auto t0 = at::randn({0}, options).as_strided({2, 0, 3}, {0, 0, 0}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); FusionExecutorCache executor_cache(std::move(fusion_ptr)); auto cg_outputs = executor_cache.runFusionWithInputs({t0}); @@ -3220,7 +3200,6 @@ TEST_F(ResizeTest, PadOfBroadcast) { auto t0 = at::randn(shape0, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3251,7 +3230,6 @@ TEST_F(ResizeTest, PadOfExpandedBroadcast) { auto t0 = at::randn(shape0, options); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); KernelExecutor ke; ke.compile(&fusion, {t0}); @@ -3593,7 +3571,6 @@ TEST_F(ResizeTest, SliceScheduledLikeProducer) { std::vector shape({100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // concrete shapes to avoid dynamic Fusion auto tv0 = makeConcreteTensor(shape); @@ -3641,7 +3618,6 @@ TEST_F(ResizeTest, PadScheduledLikeConsumer) { std::vector shape({100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // concrete shapes to avoid dynamic Fusion auto tv0 = makeConcreteTensor(shape); @@ -3689,7 +3665,6 @@ TEST_F(ResizeTest, SliceThenPadLeftHalf) { std::vector shape({100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // concrete shapes to avoid dynamic Fusion auto tv0 = makeContigConcreteTensor(shape); @@ -3741,7 +3716,6 @@ TEST_F(ResizeTest, SliceThenPadRightHalf) { std::vector shape({100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // concrete shapes to avoid dynamic Fusion auto tv0 = makeContigConcreteTensor(shape); @@ -3795,7 +3769,6 @@ TEST_F(ResizeTest, SliceThenConcat) { std::vector shape({100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); // concrete shapes to avoid dynamic Fusion auto tv0 = makeContigConcreteTensor(shape); @@ -3856,7 +3829,6 @@ TEST_F(ResizeTest, SliceSliceConcatConcat) { const int64_t rope_size = 32; EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto zero = fusion.zeroVal(); @@ -3955,7 +3927,6 @@ TEST_P(ResizeSchedulerTest, PropagateSliceToInputs) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4044,7 +4015,6 @@ TEST_P(ResizeSchedulerTest, PropagateSliceToInputsWithReshape1) { std::vector shape({16, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4135,7 +4105,6 @@ TEST_P(ResizeSchedulerTest, PropagateSliceToInputsWithReshape2) { std::vector shape({16, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4221,7 +4190,6 @@ TEST_P(ResizeSchedulerTest, PropagateMultipleSlicesToInputs1) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4333,7 +4301,6 @@ TEST_F(ResizeSchedulerTest, PropagateMultipleSlicesToInputs2) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4445,7 +4412,6 @@ TEST_F(ResizeSchedulerTest, PropagateMultipleSlicesToInputs3) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4744,7 +4710,6 @@ TEST_P(ResizeSchedulerTest, SliceRotateCat) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -4876,7 +4841,6 @@ TEST_P(ResizeSchedulerTest, SliceRotateCatResidual) { std::vector shape({16, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -5006,7 +4970,6 @@ TEST_F(ResizeSchedulerTest, SliceRotateCatTwice) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -5101,7 +5064,6 @@ TEST_P(ResizeSchedulerTest, PropagatePadToInputs) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -5192,7 +5154,6 @@ TEST_P(ResizeSchedulerTest, PropagateCatToInputs) { std::vector shape({-1, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); @@ -6125,7 +6086,6 @@ TEST_F(ResizeTest, ReshapeAfterRef) { std::vector shape({2, 16, 100}); EnableOptionsGuard enable_options_guard; - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto tv0 = makeConcreteTensor(shape); fusion.addInput(tv0); diff --git a/tests/cpp/test_rope.cpp b/tests/cpp/test_rope.cpp index cc473e4739a..6f3907d9ee9 100644 --- a/tests/cpp/test_rope.cpp +++ b/tests/cpp/test_rope.cpp @@ -50,7 +50,6 @@ struct RopeConfig { class RopeTest : public NVFuserFixtureParamTest { void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_scatter.cpp b/tests/cpp/test_scatter.cpp index bf90231d93a..5e75131f92f 100644 --- a/tests/cpp/test_scatter.cpp +++ b/tests/cpp/test_scatter.cpp @@ -54,7 +54,6 @@ class ScatterTest : public NVFuserFixtureParamTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); manual_scheduling = GetParam(); } @@ -487,7 +486,6 @@ class ScatterAccumulateTest protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); std::tie(m, n, dtype, accumulate_op) = GetParam(); } diff --git a/tests/cpp/test_select.cpp b/tests/cpp/test_select.cpp index 9156a84d8f3..fe50f248220 100644 --- a/tests/cpp/test_select.cpp +++ b/tests/cpp/test_select.cpp @@ -18,7 +18,6 @@ namespace nvfuser { class SelectTest : public NVFuserTest { protected: void SetUp() override { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); NVFuserTest::SetUp(); } }; diff --git a/tests/cpp/test_serial_gridreduce.cpp b/tests/cpp/test_serial_gridreduce.cpp index 8cf1f5dadc7..326ec3dc9be 100644 --- a/tests/cpp/test_serial_gridreduce.cpp +++ b/tests/cpp/test_serial_gridreduce.cpp @@ -37,7 +37,6 @@ class SerialGridReductionTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_stream.cpp b/tests/cpp/test_stream.cpp index 8c766cc21d1..8271ddb0715 100644 --- a/tests/cpp/test_stream.cpp +++ b/tests/cpp/test_stream.cpp @@ -29,9 +29,7 @@ namespace nvfuser { // tests/python/direct/test_stream.py because the Python API is sufficient. class StreamTest : public NVFuserTest { public: - StreamTest() { - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); - } + StreamTest() {} }; TEST_F(StreamTest, AddPerStream) { diff --git a/tests/cpp/test_topk.cpp b/tests/cpp/test_topk.cpp index f9f9abfb5bd..9be3992dd42 100644 --- a/tests/cpp/test_topk.cpp +++ b/tests/cpp/test_topk.cpp @@ -481,7 +481,6 @@ class TopKTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_transpose.cpp b/tests/cpp/test_transpose.cpp index 3d0bb16b87a..4e3864e6a4a 100644 --- a/tests/cpp/test_transpose.cpp +++ b/tests/cpp/test_transpose.cpp @@ -56,7 +56,6 @@ class TransposeTest : public NVFuserTest { void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } private: @@ -1351,7 +1350,6 @@ TEST_F(TransposeTest, ReductionIterDomainOnInputsIssue1659) { TEST_F(TransposeTest, DanglingBroadcastIssue4957) { // The issue is not specific to TensorIndexer but just make sure the // fix works with it - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); auto fusion_ptr = std::make_unique(); Fusion& fusion = *fusion_ptr.get(); diff --git a/tests/cpp/test_unary.cpp b/tests/cpp/test_unary.cpp index 9666401912d..92773091144 100644 --- a/tests/cpp/test_unary.cpp +++ b/tests/cpp/test_unary.cpp @@ -20,7 +20,6 @@ namespace nvfuser { class UnaryTest : public NVFuserFixtureParamTest { void SetUp() override { NVFuserFixtureParamTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/test_vectorization.cpp b/tests/cpp/test_vectorization.cpp index 20931bd2966..1683c168b66 100644 --- a/tests/cpp/test_vectorization.cpp +++ b/tests/cpp/test_vectorization.cpp @@ -37,7 +37,6 @@ void checkMappedVal( class VectorizationAnalysisTest : public NVFuserTest { void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -697,7 +696,6 @@ class VectorizationCastTest void SetUp() override { NVFuserTest::SetUp(); std::tie(dtype_from, dtype_to, vectorization_factor) = GetParam(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } protected: @@ -854,7 +852,6 @@ class Vect256Test : public NVFuserFixtureParamTest { NVFuserFixtureParamTest::SetUp(); NVFUSER_TEST_CUDA_ARCH_GUARD(10, 0); std::tie(dtype, cache_op) = GetParam(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } protected: diff --git a/tests/cpp/test_welford.cpp b/tests/cpp/test_welford.cpp index 3bc6bddcd87..e53bb7956b3 100644 --- a/tests/cpp/test_welford.cpp +++ b/tests/cpp/test_welford.cpp @@ -21,7 +21,6 @@ class WelfordTest : public NVFuserTest { protected: void SetUp() override { NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; diff --git a/tests/cpp/utils.cpp b/tests/cpp/utils.cpp index d433ee74d6c..9b8bba296d7 100644 --- a/tests/cpp/utils.cpp +++ b/tests/cpp/utils.cpp @@ -46,7 +46,6 @@ NVFuserTest::NVFuserTest() { std::srand(getCRandomSeed()); EnableOptionsGuard::getCurOptions().set(EnableOption::IdModelExtraValidation); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); constexpr const char* kTf32Override = "NVIDIA_TF32_OVERRIDE"; if (setenv(kTf32Override, "0", /*overwrite=*/1) != 0) { diff --git a/tests/cpp/utils.h b/tests/cpp/utils.h index 9b9ef15d86b..5d9a088f60a 100644 --- a/tests/cpp/utils.h +++ b/tests/cpp/utils.h @@ -475,7 +475,6 @@ class BlackwellBase : public NVFuserTest { "sm_100/sm_104, not sm_110+)"; } NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; @@ -487,7 +486,6 @@ class TmaBase : public NVFuserTest { GTEST_SKIP() << "skipping tests on pre-Hopper GPUs"; } NVFuserTest::SetUp(); - EnableOptionsGuard::getCurOptions().set(EnableOption::IdModel); } }; From 63d5c26171c96405248fa46f72bfa01cab5fb05b Mon Sep 17 00:00:00 2001 From: Naoya Maruyama Date: Fri, 30 Jan 2026 14:11:16 -0800 Subject: [PATCH 2/3] cleanup --- tests/cpp/test_allocation_domain.cpp | 7 +------ tests/cpp/test_allocation_order_inference.cpp | 7 +------ tests/cpp/test_argsort.cpp | 7 +------ tests/cpp/test_compute_with.cpp | 7 +------ tests/cpp/test_evaluator.cpp | 2 +- tests/cpp/test_external_src.cpp | 2 +- tests/cpp/test_gpu1.cpp | 7 +------ tests/cpp/test_gpu2.cpp | 7 +------ tests/cpp/test_gpu3.cpp | 7 +------ tests/cpp/test_greedy.cpp | 7 +------ tests/cpp/test_index_select.cpp | 7 +------ tests/cpp/test_inlining.cpp | 7 +------ tests/cpp/test_memory.cpp | 2 +- tests/cpp/test_move_repeat_forward.cpp | 7 +------ tests/cpp/test_move_split_cat.cpp | 7 +------ tests/cpp/test_outer_reduction.cpp | 7 +------ tests/cpp/test_persistent_buffer.cpp | 7 +------ tests/cpp/test_polymorphic_value.cpp | 2 +- tests/cpp/test_predicate_elimination.cpp | 7 +------ tests/cpp/test_reduction.cpp | 7 +------ tests/cpp/test_reduction_pointwise.cpp | 7 +------ tests/cpp/test_remove_bcast_squeeze.cpp | 7 +------ tests/cpp/test_replay.cpp | 7 +------ tests/cpp/test_reshape.cpp | 7 +------ tests/cpp/test_scalar_hoisting.cpp | 2 +- tests/cpp/test_select.cpp | 7 +------ tests/cpp/test_serial_gridreduce.cpp | 7 +------ tests/cpp/test_smem_reuse.cpp | 2 +- tests/cpp/test_swizzle.cpp | 2 +- tests/cpp/test_tensor_factories.cpp | 2 +- tests/cpp/test_topk.cpp | 7 +------ tests/cpp/test_vectorization.cpp | 6 +----- tests/cpp/test_welford.cpp | 7 +------ 33 files changed, 33 insertions(+), 157 deletions(-) diff --git a/tests/cpp/test_allocation_domain.cpp b/tests/cpp/test_allocation_domain.cpp index 2600fcce7a1..bb6e71de7e5 100644 --- a/tests/cpp/test_allocation_domain.cpp +++ b/tests/cpp/test_allocation_domain.cpp @@ -21,12 +21,7 @@ namespace nvfuser { -class AllocationDomainTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using AllocationDomainTest = NVFuserTest; using ::testing::ElementsAre; diff --git a/tests/cpp/test_allocation_order_inference.cpp b/tests/cpp/test_allocation_order_inference.cpp index 7b6e2096347..98f7c451da4 100644 --- a/tests/cpp/test_allocation_order_inference.cpp +++ b/tests/cpp/test_allocation_order_inference.cpp @@ -23,12 +23,7 @@ namespace nvfuser { using testing::ElementsAre; -class AllocationOrderInferenceTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using AllocationOrderInferenceTest = NVFuserTest; std::vector getAllocationOrder(TensorView* tv) { std::optional> permutation = diff --git a/tests/cpp/test_argsort.cpp b/tests/cpp/test_argsort.cpp index 22e8d3e0273..5dc4187d5ae 100644 --- a/tests/cpp/test_argsort.cpp +++ b/tests/cpp/test_argsort.cpp @@ -22,12 +22,7 @@ namespace nvfuser { -class ArgsortTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using ArgsortTest = NVFuserTest; // Parameterized test fixture for BasicExecution with different data types class ArgsortTestBasicExecution diff --git a/tests/cpp/test_compute_with.cpp b/tests/cpp/test_compute_with.cpp index 35669341e76..3cbb1803968 100644 --- a/tests/cpp/test_compute_with.cpp +++ b/tests/cpp/test_compute_with.cpp @@ -53,12 +53,7 @@ namespace nvfuser { using namespace at::indexing; -class ComputeWithTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using ComputeWithTest = NVFuserTest; namespace { diff --git a/tests/cpp/test_evaluator.cpp b/tests/cpp/test_evaluator.cpp index 5aa9300b44f..cd0868f9bc1 100644 --- a/tests/cpp/test_evaluator.cpp +++ b/tests/cpp/test_evaluator.cpp @@ -17,7 +17,7 @@ namespace nvfuser { -class ExprEvalTest : public NVFuserTest {}; +using ExprEvalTest = NVFuserTest; using ::testing::ElementsAre; using ::testing::HasSubstr; diff --git a/tests/cpp/test_external_src.cpp b/tests/cpp/test_external_src.cpp index c16bd748b66..dec7ccad881 100644 --- a/tests/cpp/test_external_src.cpp +++ b/tests/cpp/test_external_src.cpp @@ -19,7 +19,7 @@ namespace nvfuser { -class ExternalSrcExample : public NVFuserTest {}; +using ExternalSrcExample = NVFuserTest; // This is for internal testing only and is intended to be used as a template to // compile and run an external source file. By default, it should just diff --git a/tests/cpp/test_gpu1.cpp b/tests/cpp/test_gpu1.cpp index de9686f1f7c..1397287e6ec 100644 --- a/tests/cpp/test_gpu1.cpp +++ b/tests/cpp/test_gpu1.cpp @@ -55,12 +55,7 @@ namespace nvfuser { using namespace at::indexing; -class Gpu1Test : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using Gpu1Test = NVFuserTest; // A few smoke tests for IrGraphGenerator // (These tests exercise IrGraphGenerator through a non-trivial IR, diff --git a/tests/cpp/test_gpu2.cpp b/tests/cpp/test_gpu2.cpp index 92de2a3d71e..7bb99b2fd3a 100644 --- a/tests/cpp/test_gpu2.cpp +++ b/tests/cpp/test_gpu2.cpp @@ -56,12 +56,7 @@ namespace nvfuser { using namespace at::indexing; -class Gpu2Test : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using Gpu2Test = NVFuserTest; TEST_F(Gpu2Test, FusionGlobalIntermediate_CUDA) { Fusion fusion; diff --git a/tests/cpp/test_gpu3.cpp b/tests/cpp/test_gpu3.cpp index 8c840d780e5..8d2e6de5f0b 100644 --- a/tests/cpp/test_gpu3.cpp +++ b/tests/cpp/test_gpu3.cpp @@ -61,12 +61,7 @@ namespace nvfuser { using namespace at::indexing; -class Gpu3Test : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using Gpu3Test = NVFuserTest; TEST_F(Gpu3Test, FusionNonDivisibleSplit1_CUDA) { Fusion fusion; diff --git a/tests/cpp/test_greedy.cpp b/tests/cpp/test_greedy.cpp index 27f25b302bf..cbf8c5d33c4 100644 --- a/tests/cpp/test_greedy.cpp +++ b/tests/cpp/test_greedy.cpp @@ -23,12 +23,7 @@ namespace nvfuser { -class GreedySchedulerTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using GreedySchedulerTest = NVFuserTest; class GreedySchedulerTestConstraintSize : public GreedySchedulerTest, diff --git a/tests/cpp/test_index_select.cpp b/tests/cpp/test_index_select.cpp index 5e65496e7f7..29f45fdaaf8 100644 --- a/tests/cpp/test_index_select.cpp +++ b/tests/cpp/test_index_select.cpp @@ -71,12 +71,7 @@ void checkIndexSelectVectorization( } // namespace -class IndexSelectTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using IndexSelectTest = NVFuserTest; TEST_F(IndexSelectTest, Simple1) { for (int i = 0; i < 5; ++i) { diff --git a/tests/cpp/test_inlining.cpp b/tests/cpp/test_inlining.cpp index 303a8915c67..c520dc7dde8 100644 --- a/tests/cpp/test_inlining.cpp +++ b/tests/cpp/test_inlining.cpp @@ -20,12 +20,7 @@ namespace nvfuser { -class InliningTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using InliningTest = NVFuserTest; TEST_F(InliningTest, InliningMismatchedDims1) { Fusion fusion; diff --git a/tests/cpp/test_memory.cpp b/tests/cpp/test_memory.cpp index c5f81b1b2f3..c4fdd06de15 100644 --- a/tests/cpp/test_memory.cpp +++ b/tests/cpp/test_memory.cpp @@ -1731,7 +1731,7 @@ TEST_F(TMAMiscTest, LoadStrongCorrectness) { // It is not required to run compile-time invalid case tests on Hopper or newer // GPUs. Detecting invalid cases does not even require a GPU. -class TMACompileTimeInvalidTest : public NVFuserTest {}; +using TMACompileTimeInvalidTest = NVFuserTest; class TMARuntimeInvalidTest : public TMATest {}; TEST_F(TMACompileTimeInvalidTest, BulkNotInTMA) { diff --git a/tests/cpp/test_move_repeat_forward.cpp b/tests/cpp/test_move_repeat_forward.cpp index 421ce454194..39e9d96d3f2 100644 --- a/tests/cpp/test_move_repeat_forward.cpp +++ b/tests/cpp/test_move_repeat_forward.cpp @@ -19,12 +19,7 @@ namespace nvfuser { -class MoveRepeatForwardTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using MoveRepeatForwardTest = NVFuserTest; TEST_F(MoveRepeatForwardTest, Simple) { auto fusion_ptr = std::make_unique(); diff --git a/tests/cpp/test_move_split_cat.cpp b/tests/cpp/test_move_split_cat.cpp index 11ac5bd11b5..17396ed66de 100644 --- a/tests/cpp/test_move_split_cat.cpp +++ b/tests/cpp/test_move_split_cat.cpp @@ -18,12 +18,7 @@ namespace nvfuser { using testing::Contains; -class MoveSplitCatTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using MoveSplitCatTest = NVFuserTest; TEST_F(MoveSplitCatTest, Cancellable_SplitImmediatelyFollowedByCat) { auto fusion = std::make_unique(); diff --git a/tests/cpp/test_outer_reduction.cpp b/tests/cpp/test_outer_reduction.cpp index 67ce0b78806..01ffff764c1 100644 --- a/tests/cpp/test_outer_reduction.cpp +++ b/tests/cpp/test_outer_reduction.cpp @@ -33,12 +33,7 @@ namespace nvfuser { -class OuterReductionTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using OuterReductionTest = NVFuserTest; using namespace at::indexing; diff --git a/tests/cpp/test_persistent_buffer.cpp b/tests/cpp/test_persistent_buffer.cpp index 13484094430..d5ff63fb34c 100644 --- a/tests/cpp/test_persistent_buffer.cpp +++ b/tests/cpp/test_persistent_buffer.cpp @@ -28,12 +28,7 @@ namespace nvfuser { using testing::Contains; using testing::UnorderedElementsAre; -class PersistentBufferTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using PersistentBufferTest = NVFuserTest; TEST_F(PersistentBufferTest, FusionPersistentBufferCalculation1_CUDA) { Fusion fusion; diff --git a/tests/cpp/test_polymorphic_value.cpp b/tests/cpp/test_polymorphic_value.cpp index 27040682ea4..332f1157d5a 100644 --- a/tests/cpp/test_polymorphic_value.cpp +++ b/tests/cpp/test_polymorphic_value.cpp @@ -18,7 +18,7 @@ namespace nvfuser { using dynamic_type::has_explicit_conversion_v; -class PolymorphicValueTest : public NVFuserTest {}; +using PolymorphicValueTest = NVFuserTest; TEST_F(PolymorphicValueTest, OpaqueEquality) { Opaque a{DataType::Int}, b{DataType::Int}; diff --git a/tests/cpp/test_predicate_elimination.cpp b/tests/cpp/test_predicate_elimination.cpp index 2306bfe2eaf..2e6e0c727f5 100644 --- a/tests/cpp/test_predicate_elimination.cpp +++ b/tests/cpp/test_predicate_elimination.cpp @@ -16,12 +16,7 @@ namespace nvfuser { -class PredicateEliminationTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using PredicateEliminationTest = NVFuserTest; TEST_F(PredicateEliminationTest, 1) { Fusion fusion; diff --git a/tests/cpp/test_reduction.cpp b/tests/cpp/test_reduction.cpp index 319a81c65e5..2c586160094 100644 --- a/tests/cpp/test_reduction.cpp +++ b/tests/cpp/test_reduction.cpp @@ -74,12 +74,7 @@ void validateNoParallelBroadcastExist(kir::Kernel* kernel) { } // namespace -class ReductionTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using ReductionTest = NVFuserTest; TEST_F(ReductionTest, GridAllreduce1) { const int nx = 999; diff --git a/tests/cpp/test_reduction_pointwise.cpp b/tests/cpp/test_reduction_pointwise.cpp index 15c9d823a24..7aa5747442b 100644 --- a/tests/cpp/test_reduction_pointwise.cpp +++ b/tests/cpp/test_reduction_pointwise.cpp @@ -17,12 +17,7 @@ namespace nvfuser { -class PointwiseFusedReductionTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using PointwiseFusedReductionTest = NVFuserTest; // inner reduction + non-broadcast epilogue, can't be fused // outer reduction + non-broadcast epilogue, can be fused diff --git a/tests/cpp/test_remove_bcast_squeeze.cpp b/tests/cpp/test_remove_bcast_squeeze.cpp index fa804749399..4cf83b8e87e 100644 --- a/tests/cpp/test_remove_bcast_squeeze.cpp +++ b/tests/cpp/test_remove_bcast_squeeze.cpp @@ -22,12 +22,7 @@ namespace nvfuser { -class RemoveBcastSqueezeTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using RemoveBcastSqueezeTest = NVFuserTest; namespace { diff --git a/tests/cpp/test_replay.cpp b/tests/cpp/test_replay.cpp index 573243b8ded..866f98fbb9c 100644 --- a/tests/cpp/test_replay.cpp +++ b/tests/cpp/test_replay.cpp @@ -25,12 +25,7 @@ using testing::Optional; using testing::Property; using testing::SizeIs; -class ReplayTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using ReplayTest = NVFuserTest; TEST_F(ReplayTest, HorizontallyMergeReshapeAndPermute) { auto fusion = std::make_unique(); diff --git a/tests/cpp/test_reshape.cpp b/tests/cpp/test_reshape.cpp index a40b7cd797b..7ad69dff1ad 100644 --- a/tests/cpp/test_reshape.cpp +++ b/tests/cpp/test_reshape.cpp @@ -52,12 +52,7 @@ namespace nvfuser { using testing::UnorderedElementsAre; -class ReshapeTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using ReshapeTest = NVFuserTest; TEST_F(ReshapeTest, ViewDtypeSameSizeOutput) { Fusion fusion; diff --git a/tests/cpp/test_scalar_hoisting.cpp b/tests/cpp/test_scalar_hoisting.cpp index ce97d82221a..9b69a0c99a8 100644 --- a/tests/cpp/test_scalar_hoisting.cpp +++ b/tests/cpp/test_scalar_hoisting.cpp @@ -16,7 +16,7 @@ namespace nvfuser { -class ScalarHoistTest : public NVFuserTest {}; +using ScalarHoistTest = NVFuserTest; TEST_F(ScalarHoistTest, IndexHoist1) { if (isOptionDisabled(DisableOption::IndexHoist)) { diff --git a/tests/cpp/test_select.cpp b/tests/cpp/test_select.cpp index fe50f248220..e75d1a85d66 100644 --- a/tests/cpp/test_select.cpp +++ b/tests/cpp/test_select.cpp @@ -15,12 +15,7 @@ namespace nvfuser { -class SelectTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using SelectTest = NVFuserTest; TEST_F(SelectTest, Pointwise) { auto fusion_ptr = std::make_unique(); diff --git a/tests/cpp/test_serial_gridreduce.cpp b/tests/cpp/test_serial_gridreduce.cpp index 326ec3dc9be..19561d35c1f 100644 --- a/tests/cpp/test_serial_gridreduce.cpp +++ b/tests/cpp/test_serial_gridreduce.cpp @@ -33,12 +33,7 @@ namespace nvfuser { -class SerialGridReductionTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using SerialGridReductionTest = NVFuserTest; TEST_F(SerialGridReductionTest, Scheduling) { for (bool serial : {true, false}) { diff --git a/tests/cpp/test_smem_reuse.cpp b/tests/cpp/test_smem_reuse.cpp index 176edaa5369..294f860e452 100644 --- a/tests/cpp/test_smem_reuse.cpp +++ b/tests/cpp/test_smem_reuse.cpp @@ -30,7 +30,7 @@ namespace nvfuser { using namespace at::indexing; -class SmemReuseTest : public NVFuserTest {}; +using SmemReuseTest = NVFuserTest; // Test that we re-use different-size smem allocations // diff --git a/tests/cpp/test_swizzle.cpp b/tests/cpp/test_swizzle.cpp index 97bd398b8db..30c8706354c 100644 --- a/tests/cpp/test_swizzle.cpp +++ b/tests/cpp/test_swizzle.cpp @@ -22,7 +22,7 @@ namespace nvfuser { -class SwizzleTest : public NVFuserTest {}; +using SwizzleTest = NVFuserTest; TEST_F(SwizzleTest, Transpose1) { Fusion fusion; diff --git a/tests/cpp/test_tensor_factories.cpp b/tests/cpp/test_tensor_factories.cpp index ff67a500032..52d50a30df7 100644 --- a/tests/cpp/test_tensor_factories.cpp +++ b/tests/cpp/test_tensor_factories.cpp @@ -21,7 +21,7 @@ namespace nvfuser { -class TensorFactoryTest : public NVFuserTest {}; +using TensorFactoryTest = NVFuserTest; TEST_F(TensorFactoryTest, StandaloneFull) { auto sizes = {0, 1, 10, 17, 1024}; diff --git a/tests/cpp/test_topk.cpp b/tests/cpp/test_topk.cpp index 9be3992dd42..27717a03898 100644 --- a/tests/cpp/test_topk.cpp +++ b/tests/cpp/test_topk.cpp @@ -477,12 +477,7 @@ TEST_F(TopKDynamicTest, KZeroConcretization) { << tv3->definition()->toString(); } -class TopKTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using TopKTest = NVFuserTest; // Parameterized test fixture for BasicExecution with different data types class TopKTestBasicExecution : public TopKTest, diff --git a/tests/cpp/test_vectorization.cpp b/tests/cpp/test_vectorization.cpp index 1683c168b66..3dfc7bd407c 100644 --- a/tests/cpp/test_vectorization.cpp +++ b/tests/cpp/test_vectorization.cpp @@ -34,11 +34,7 @@ void checkMappedVal( } // namespace -class VectorizationAnalysisTest : public NVFuserTest { - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using VectorizationAnalysisTest = NVFuserTest; // Simple pad test TEST_F( diff --git a/tests/cpp/test_welford.cpp b/tests/cpp/test_welford.cpp index e53bb7956b3..239143c63d3 100644 --- a/tests/cpp/test_welford.cpp +++ b/tests/cpp/test_welford.cpp @@ -17,12 +17,7 @@ namespace nvfuser { -class WelfordTest : public NVFuserTest { - protected: - void SetUp() override { - NVFuserTest::SetUp(); - } -}; +using WelfordTest = NVFuserTest; TEST_F(WelfordTest, SerialWelford) { int x = 128, y = 64, z = 64; From 46419431e09b211c0d7b8090fbb9a80b118df2d6 Mon Sep 17 00:00:00 2001 From: Naoya Maruyama Date: Fri, 30 Jan 2026 15:19:05 -0800 Subject: [PATCH 3/3] cleanup --- python/nvfuser_direct/__init__.py | 7 ++----- tests/python/conftest.py | 3 ++- tests/python/direct/test_with_id_model_indexer.py | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/python/nvfuser_direct/__init__.py b/python/nvfuser_direct/__init__.py index 34780436eac..5dd20d078e0 100644 --- a/python/nvfuser_direct/__init__.py +++ b/python/nvfuser_direct/__init__.py @@ -367,14 +367,11 @@ def execute( # Delete the _fusion and reference the fusion inside FusionExecutorCache del self._fusion - # Add "id_model" as a default enable option - default_enable_options = ["id_model"] - merged_enable_options = default_enable_options + _enable_options - + # Note: id_model is now enabled by default in C++, so no need to add it here return self.fec.execute( inputs, device=self._get_device_index(device), - _enable_options=merged_enable_options, + _enable_options=_enable_options, _disable_options=_disable_options, ) diff --git a/tests/python/conftest.py b/tests/python/conftest.py index 174cbdd4dee..29dceaf73ec 100644 --- a/tests/python/conftest.py +++ b/tests/python/conftest.py @@ -11,8 +11,9 @@ def pytest_configure(config): and initial conftest files have been loaded. """ # Append to NVFUSER_ENABLE environment variable for all tests in this directory + # Note: id_model is now enabled by default, so we only need extra validation existing = os.environ.get("NVFUSER_ENABLE", "") - new_options = "id_model,id_model_extra_validation" + new_options = "id_model_extra_validation" if existing: os.environ["NVFUSER_ENABLE"] = f"{existing},{new_options}" diff --git a/tests/python/direct/test_with_id_model_indexer.py b/tests/python/direct/test_with_id_model_indexer.py index 89b0f8458eb..a75ed65b7f8 100644 --- a/tests/python/direct/test_with_id_model_indexer.py +++ b/tests/python/direct/test_with_id_model_indexer.py @@ -9,7 +9,6 @@ FusionDefinition, DataType, ) -from python.utils import set_env from python.direct_utils import ( FLOAT4_E2M1_MAX, FLOAT8_E4M3_EPS, @@ -176,8 +175,8 @@ def nvfuser_fusion_id0(fd: FusionDefinition) -> None: # FIXME: force indexing to use IdModel indexer to avoid indexing error. # see issue: https://github.com/NVIDIA/Fuser/issues/5200 - with set_env(NVFUSER_ENABLE="id_model(all)"): - o, _ = nvfuser_direct_test.exec_nvfuser(nvfuser_fusion_id0, inputs) + # NOTE: IdModel indexer is now enabled by default, so this is no longer needed. + o, _ = nvfuser_direct_test.exec_nvfuser(nvfuser_fusion_id0, inputs) # quantization for activation is needed for reference. # note: following sglang implementation, not computing global scaling factor for mat1