Skip to content

Commit

Permalink
Lower local dialects in GPU pipeline (#917)
Browse files Browse the repository at this point in the history
Adds missing conversion after #916 to allow Perf dialect lowering used
in GPU benchmarks.
  • Loading branch information
adam-smnk authored Jun 3, 2024
1 parent db212a8 commit 761f011
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/TPP/GPU/GpuPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ struct GpuPipeline : public tpp::impl::GpuPipelineBase<GpuPipeline>,
registry.insert<nvgpu::NVGPUDialect>();
registry.insert<bufferization::BufferizationDialect>();
registry.insert<spirv::SPIRVDialect>();
registry.insert<check::CheckDialect>();
registry.insert<perf::PerfDialect>();
check::registerBufferizableOpInterfaceExternalModels(registry);
perf::registerBufferizableOpInterfaceExternalModels(registry);

Expand Down Expand Up @@ -179,6 +181,9 @@ struct GpuPipeline : public tpp::impl::GpuPipelineBase<GpuPipeline>,
}
}

// Covert all local dialects like perf.
pm.addPass(createLocalDialectsLowering());

// Clean up after the GPU pipeline.
// Use upstream passes directly instead of the cleanup pass as the GPU
// kernel is at the LLVM dialect level which is not compatible with the
Expand Down

0 comments on commit 761f011

Please sign in to comment.