JIT pass to insert XNNPACK ops (#34048)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34048

Rewrites the graph to insert xnnpack prepack and packed run ops for
conv2d and linear.

Test Plan:
python test/test_xnnpack_integration.py

Imported from OSS

Differential Revision: D20185658

fbshipit-source-id: c4c073c912ad33e822e7beb4ed86c9f895129d55
This commit is contained in:
Kimish Patel
2020-03-14 12:48:24 -07:00
committed by Facebook GitHub Bot
parent 4c30fc7238
commit 7dd5da2026
9 changed files with 377 additions and 66 deletions

View File

@ -411,6 +411,7 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
${TORCH_SRC_DIR}/csrc/jit/passes/inline_fork_wait.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/graph_fuser.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/cuda_graph_fuser.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/graph_rewrite_helper.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/guard_elimination.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/inplace_check.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/liveness.cpp
@ -431,6 +432,7 @@ if (NOT INTERN_BUILD_MOBILE OR NOT BUILD_CAFFE2_MOBILE)
${TORCH_SRC_DIR}/csrc/jit/passes/utils/check_alias_annotation.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/utils/memory_dag.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/quantization.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/xnnpack_rewrite.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/fuse_linear.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/freeze_module.cpp
${TORCH_SRC_DIR}/csrc/jit/runtime/print_handler.cpp