From de04f1216ac3be2560d0e0331d46c2815968b611 Mon Sep 17 00:00:00 2001 From: jjsjann123 Date: Mon, 13 Jan 2025 15:56:33 -0800 Subject: [PATCH] removing unused NoOpHeuristic (#3670) 1. Removing unused NoOpHeuristic; 2. Moving computation of scheduler/launch params into the block when it's needed. --- benchmarks/cpp/utils.cpp | 8 ++++---- csrc/scheduler/no_op.h | 20 -------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/benchmarks/cpp/utils.cpp b/benchmarks/cpp/utils.cpp index f0c99f830f8..4d069b3ec47 100644 --- a/benchmarks/cpp/utils.cpp +++ b/benchmarks/cpp/utils.cpp @@ -190,14 +190,14 @@ int64_t runBenchmarkIterations( ->groups() .size() > 1; - const auto& compile_log = executor_cache->getMostRecentExecutorInfo(); - auto params = toString(compile_log.params); - auto lparams = toString( - compile_log.fusion_executor->as()->lastLaunchParams()); // Only set if not segmented. In the case of segmented fusions, // this could be confusing as the log would refect only the last // segment. Revisit if necessary. if (!segmented) { + const auto& compile_log = executor_cache->getMostRecentExecutorInfo(); + auto params = toString(compile_log.params); + auto lparams = toString( + compile_log.fusion_executor->as()->lastLaunchParams()); benchmark_state.SetLabel(params + lparams); } diff --git a/csrc/scheduler/no_op.h b/csrc/scheduler/no_op.h index 3dbd53e8e0a..6f88f521bd5 100644 --- a/csrc/scheduler/no_op.h +++ b/csrc/scheduler/no_op.h @@ -45,24 +45,4 @@ class NoOpScheduler : public SchedulerEntry { } }; -//! Provides a dummy heuristic type to ensure -//! unified interface on NoOp scheduler. -class NoOpHeuristic : public HeuristicParams { - public: - using HeuristicParams::HeuristicParams; - NoOpHeuristic() : HeuristicParams(SchedulerType::NoOp) {}; - - size_t hash() const override { - return 0; - } - std::unique_ptr clone() const override { - return std::make_unique(*this); - } - - bool sameAs(const HeuristicParams* other) const override { - auto other_casted = dynamic_cast(other); - return other_casted != nullptr && other_casted->cparams == cparams; - }; -}; - } // namespace nvfuser