Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions csrc/runtime/compiled_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,13 @@ NVF_API CompiledKernel::CompiledKernel(
lowered_(std::make_unique<GpuLower>(fusion, compile_params)),
device_(device) {
FUSER_PERF_SCOPE("CompiledKernel::CompiledKernel");

if (isDebugDumpEnabled(DebugDumpOption::FusionIr)) {
fusion->print();
} else if (isDebugDumpEnabled(DebugDumpOption::FusionIrMath)) {
fusion->printMath();
}

// TODO: No hooks can be sent because this is in the constructor
for (const auto& hook : pre_lowering_hooks) {
hook(lowered_.get());
Expand Down Expand Up @@ -1202,12 +1209,6 @@ void CompiledKernel::compile(int64_t block_size) {
// it under these circumstances.
disable_parameter_cache_ = requiresDisabledParamCache(kernel());

if (isDebugDumpEnabled(DebugDumpOption::FusionIr)) {
kernel()->print();
} else if (isDebugDumpEnabled(DebugDumpOption::FusionIrMath)) {
kernel()->printMath();
}

if (isDebugDumpEnabled(DebugDumpOption::FusionIrGraph)) {
std::stringstream file_name;
file_name << "__tmp_fusion_ir_graph_" << kernel_id_ << ".dot";
Expand Down
Loading