From 60c013e4f0550090aab10fee1f46602d31c9e66f Mon Sep 17 00:00:00 2001 From: Ean Garvey Date: Tue, 20 Feb 2024 08:50:53 -0600 Subject: [PATCH] Tweak compile-time flags for SD submodels. --- apps/shark_studio/api/sd.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/apps/shark_studio/api/sd.py b/apps/shark_studio/api/sd.py index afc4915a2c..8499b652dc 100644 --- a/apps/shark_studio/api/sd.py +++ b/apps/shark_studio/api/sd.py @@ -45,16 +45,15 @@ "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-preprocessing-pad-linalg-ops{pad-size=16}))", ], }, - # "vae_encode": { - # "initializer": vae.export_vae_model, - # "ireec_flags": [ - # "--iree-flow-collapse-reduction-dims", - # "--iree-opt-const-expr-hoisting=False", - # "--iree-codegen-linalg-max-constant-fold-elements=9223372036854775807", - # "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-global-opt-detach-elementwise-from-named-ops,iree-global-opt-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-convert-conv2d-to-img2col,iree-preprocessing-pad-linalg-ops{pad-size=32},iree-linalg-ext-convert-conv2d-to-winograd))", - # "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-preprocessing-pad-linalg-ops{pad-size=16}))", - # ], - # }, + "vae_encode": { + "initializer": vae.export_vae_model, + "ireec_flags": [ + "--iree-flow-collapse-reduction-dims", + "--iree-opt-const-expr-hoisting=False", + "--iree-codegen-linalg-max-constant-fold-elements=9223372036854775807", + "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-global-opt-detach-elementwise-from-named-ops,iree-global-opt-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-convert-conv2d-to-img2col,iree-preprocessing-pad-linalg-ops{pad-size=32},iree-linalg-ext-convert-conv2d-to-winograd))", + ], + }, "unet": { "initializer": unet.export_unet_model, "ireec_flags": [ @@ -71,7 +70,6 @@ "--iree-opt-const-expr-hoisting=False", "--iree-codegen-linalg-max-constant-fold-elements=9223372036854775807", "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-global-opt-detach-elementwise-from-named-ops,iree-global-opt-convert-1x1-filter-conv2d-to-matmul,iree-preprocessing-convert-conv2d-to-img2col,iree-preprocessing-pad-linalg-ops{pad-size=32},iree-linalg-ext-convert-conv2d-to-winograd))", - "--iree-preprocessing-pass-pipeline=builtin.module(func.func(iree-preprocessing-pad-linalg-ops{pad-size=16}))", ], }, }