Reorder kernel gen passes.

This is due to moving patterns between the two  passes to allow proper unranked handling of both binary and special unary functions.

PiperOrigin-RevId: 337840967
Change-Id: Ia4f560526cbe65d13ab455dd83230e05f62c9421
This commit is contained in:
Tres Popp 2020-10-19 06:15:12 -07:00 committed by TensorFlower Gardener
parent 635faa44b2
commit 756a3d71ed

View File

@ -87,8 +87,8 @@ Status LowerTFtoGPU(mlir::ModuleOp module, bool gpu_binary_only,
} else {
pm.addPass(mlir::mhlo::createLegalizeTFPass(
/*allow_partial_conversion=*/false, /*legalize_chlo=*/false));
pm.addPass(mlir::mhlo::createChloLegalizeToHloPass());
pm.addPass(mlir::createTransformUnrankedHloPass());
pm.addPass(mlir::mhlo::createChloLegalizeToHloPass());
pm.addPass(mlir::kernel_gen::transforms::CreateShapeToDescriptorsPass());
// Clean up the IR created above. In particular, operations on descriptors
// are simplified here.