From c1990208ab654b96c4f6333e8c8b42f3db28aa21 Mon Sep 17 00:00:00 2001 From: Christian Sarofeen Date: Wed, 1 Jan 2025 09:33:23 -0800 Subject: [PATCH] Remove schduler_type from KernelExecutor. --- csrc/runtime/executor.cpp | 7 ++----- csrc/runtime/executor.h | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/csrc/runtime/executor.cpp b/csrc/runtime/executor.cpp index 3f72f43e419..1296aa47870 100644 --- a/csrc/runtime/executor.cpp +++ b/csrc/runtime/executor.cpp @@ -176,7 +176,6 @@ void KernelExecutor::compile( NVF_ERROR( supported(fusion_.get()), "KernelExecutor does not support the Fusion provided."); - scheduler_type_ = scheduler_type; NVF_ERROR( !fusion_->outputs().empty(), @@ -914,7 +913,7 @@ std::vector KernelExecutor::run( group_id_); SegmentProfiler& sprof = FusionProfiler::segment(group_id_); sprof.inputBytesAccessed(computeBytes(args)); - sprof.scheduler(toString(scheduler_type_)); + sprof.scheduler(toString(compiledKernel()->schedulerType())); FusionProfiler::segment(group_id_).setDevice(args.getDeviceIndex()); sprof.startKernel(); } @@ -1197,7 +1196,7 @@ flatbuffers::Offset KernelExecutor::serialize( compiledKernel()->blockSizeHighWaterMark(), compiledKernel()->maxrregcountHighWaterMark(), warp_size_, - toUnderlying(scheduler_type_), + toUnderlying(compiledKernel()->schedulerType()), fusion_id_, concrete_id_, runtime_id_, @@ -1367,8 +1366,6 @@ void KernelExecutor::deserialize( " vs ", buffer->heuristic()); - scheduler_type_ = scheduler_type; - auto device = c10::Device(c10::DeviceType::CUDA, device_index); c10::DeviceGuard dg(device); diff --git a/csrc/runtime/executor.h b/csrc/runtime/executor.h index 57d99e6b862..8fb8592ab2a 100644 --- a/csrc/runtime/executor.h +++ b/csrc/runtime/executor.h @@ -374,9 +374,6 @@ class KernelExecutor : public ExecutorAbstract { // Post-lowering hooks that are called to modify the kernel after lowering. // The main use case is for unit tests to modify the kernel. std::vector> post_lowering_hooks_; - - // TODO: Should this be removed? - SchedulerType scheduler_type_ = SchedulerType::None; }; } // namespace nvfuser