Skip to content

v1.8.4 patch 2

Latest

Choose a tag to compare

@Wheest Wheest released this 17 Dec 14:53
db2ce93

Applies the patch:

diff --git a/stablehlo/integrations/c/CMakeLists.txt b/stablehlo/integrations/c/CMakeLists.txt
index 400a1121..47a2ac1b 100644
--- a/stablehlo/integrations/c/CMakeLists.txt
+++ b/stablehlo/integrations/c/CMakeLists.txt
@@ -48,6 +48,7 @@ add_mlir_public_c_api_library(StablehloCAPI
   StablehloReferenceApi
   StablehloReferenceConfiguration
   StablehloSerialization
+  StablehloTOSATransforms
   Version
 )

diff --git a/stablehlo/integrations/c/StablehloPasses.cpp b/stablehlo/integrations/c/StablehloPasses.cpp
index a208d01f..5a2ee95d 100644
--- a/stablehlo/integrations/c/StablehloPasses.cpp
+++ b/stablehlo/integrations/c/StablehloPasses.cpp
@@ -13,5 +13,11 @@ limitations under the License.
 #include "stablehlo/integrations/c/StablehloPasses.h"

 #include "stablehlo/transforms/Passes.h"
+#include "stablehlo/conversions/linalg/transforms/Passes.h"
+#include "stablehlo/conversions/tosa/transforms/Passes.h"

-void mlirRegisterAllStablehloPasses() { mlir::stablehlo::registerPasses(); }
+void mlirRegisterAllStablehloPasses() {
+    mlir::stablehlo::registerPasses();
+    mlir::stablehlo::registerStablehloLinalgTransformsPasses();
+    mlir::tosa::registerStablehloTOSATransformsPasses();
+}