Skip to content

Commit

Permalink
graph: backend: dnnl: fuse dst scale/zps for layout propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
wzt1997 authored and TaoLv committed Dec 15, 2024
1 parent 0fd3b73 commit c852fdc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/graph/backend/dnnl/kernels/sdp_primitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ status_t sdp_primitive_kernel_t<quantized>::compile_impl(
BACKEND_DNNL_ADD_PASS(pipeline, convert_to_runtime_src_zero_points);
BACKEND_DNNL_ADD_PASS(pipeline, fuse_src_zero_points);
BACKEND_DNNL_ADD_PASS(pipeline, insert_runtime_u8_to_s8_for_matmul);
BACKEND_DNNL_ADD_PASS(pipeline, convert_to_runtime_dst_scales);
BACKEND_DNNL_ADD_PASS(pipeline, fuse_dst_scales);
BACKEND_DNNL_ADD_PASS(pipeline, convert_to_runtime_dst_zero_points);
BACKEND_DNNL_ADD_PASS(pipeline, fuse_dst_zero_points);
}
BACKEND_DNNL_ADD_PASS(pipeline, binary_canonicalization);
BACKEND_DNNL_ADD_PASS(pipeline, insert_permute_for_matmul);
Expand All @@ -83,6 +87,7 @@ status_t sdp_primitive_kernel_t<quantized>::compile_impl(

pipeline.reset_visualize_arg(true, false);
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);
BACKEND_DNNL_ADD_PASS(pipeline, layout_propagation);

Expand Down

0 comments on commit c852fdc

Please sign in to comment.