Skip to content

Commit

Permalink
Remove schduler_type from KernelExecutor.
Browse files Browse the repository at this point in the history
  • Loading branch information
csarofeen committed Jan 1, 2025
1 parent b458c7e commit c199020
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions csrc/runtime/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -914,7 +913,7 @@ std::vector<at::Tensor> 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();
}
Expand Down Expand Up @@ -1197,7 +1196,7 @@ flatbuffers::Offset<serde::KernelExecutor> KernelExecutor::serialize(
compiledKernel()->blockSizeHighWaterMark(),
compiledKernel()->maxrregcountHighWaterMark(),
warp_size_,
toUnderlying(scheduler_type_),
toUnderlying(compiledKernel()->schedulerType()),
fusion_id_,
concrete_id_,
runtime_id_,
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 0 additions & 3 deletions csrc/runtime/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::function<void(kir::Kernel*)>> post_lowering_hooks_;

// TODO: Should this be removed?
SchedulerType scheduler_type_ = SchedulerType::None;
};

} // namespace nvfuser

0 comments on commit c199020

Please sign in to comment.