[spirv] Re-enable module linking (#7119)
SwiftShader now supports multiple entry points in the same module
better.
diff --git a/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp b/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp
index 49b983d..7b58284 100644
--- a/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp
+++ b/iree/compiler/Dialect/HAL/Target/VulkanSPIRV/VulkanSPIRVTarget.cpp
@@ -155,9 +155,6 @@
buildSPIRVCodegenPassPipeline(passManager);
}
- // TODO(antiagainst): Re-enable SPIR-V linking once the tensorflow integration
- // crash is fixed.
-#if 0
LogicalResult linkExecutables(mlir::ModuleOp moduleOp) override {
// Note: Vulkan flavored SPIR-V does not have linking in the conventional
// sense. For example, there is no cross-module symbol reference and symbol
@@ -207,7 +204,7 @@
SmallVector<mlir::ModuleOp, 8> innerModuleOps;
innerModuleOps.reserve(sourceExecutableOpGroups.size());
- for (auto hashExecutablePair : sourceExecutableOpGroups) {
+ for (const auto &hashExecutablePair : sourceExecutableOpGroups) {
llvm::hash_code hash = hashExecutablePair.first;
const auto &sourceExecutableOps = hashExecutablePair.second;
@@ -269,7 +266,6 @@
return success();
}
-#endif
LogicalResult serializeExecutable(IREE::HAL::ExecutableVariantOp variantOp,
OpBuilder &executableBuilder) override {