NFC: Refactor Dialect Conversion targeting SPIR-V.
authorMahesh Ravishankar <ravishankarm@google.com>
Thu, 14 Nov 2019 20:31:32 +0000 (12:31 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 14 Nov 2019 20:34:54 +0000 (12:34 -0800)
commita78bd84cf84c00914f48781fa0c561cbb6bdf847
tree4dcbb2dda75c48cef177c8d0237578307c3ad258
parenta4669cd3b49f1e7b7b06bcc5602ab00da5b99efb
NFC: Refactor Dialect Conversion targeting SPIR-V.

Refactoring the conversion from StandardOps/GPU dialect to SPIR-V
dialect:
1) Move the SPIRVTypeConversion and SPIRVOpLowering class into SPIR-V
   dialect.
2) Add header files that expose functions to add patterns for the
   dialects to SPIR-V lowering, as well as a pass that does the
   dialect to SPIR-V lowering.
3) Make SPIRVOpLowering derive from OpLowering class.
PiperOrigin-RevId: 280486871
15 files changed:
mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.h [new file with mode: 0644]
mlir/include/mlir/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.h [new file with mode: 0644]
mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
mlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.h [new file with mode: 0644]
mlir/include/mlir/Dialect/SPIRV/Passes.h
mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h [new file with mode: 0644]
mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp [moved from mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp with 54% similarity]
mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp [new file with mode: 0644]
mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
mlir/lib/Dialect/SPIRV/CMakeLists.txt
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp [new file with mode: 0644]
mlir/tools/mlir-opt/CMakeLists.txt