From edf4a4f79d9e03767c7619996da2277f48c886c9 Mon Sep 17 00:00:00 2001 From: "Zhang, Rong A" Date: Wed, 22 Jan 2025 09:53:50 +0800 Subject: [PATCH] graph: backend: dnnl: enable block format in large partition kernel --- src/graph/backend/dnnl/kernels/large_partition.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graph/backend/dnnl/kernels/large_partition.cpp b/src/graph/backend/dnnl/kernels/large_partition.cpp index d7514da0c1d..340b575cf40 100644 --- a/src/graph/backend/dnnl/kernels/large_partition.cpp +++ b/src/graph/backend/dnnl/kernels/large_partition.cpp @@ -135,6 +135,11 @@ void larger_partition_kernel_t::setup_pipeline_stage1( void larger_partition_kernel_t::setup_pipeline_stage2(pass_pipeline_t &pipeline, memory_planner_t &mem_planner, bool enable_constant_cache) { pipeline.reset_visualize_arg(true, false); + // do constant propagation here so that we can + // prepare constant info for other optimizations. + if (enable_constant_cache) { + BACKEND_DNNL_ADD_PASS(pipeline, constant_propagation); + } BACKEND_DNNL_ADD_PASS(pipeline, infer_shape); BACKEND_DNNL_ADD_PASS(pipeline, fuse_src_transpose_to_matmul); BACKEND_DNNL_ADD_PASS(pipeline, fuse_dst_transpose_to_matmul);