mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Changes to transition to generic API for ops with weight prepacking (#35010)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35010 semantics. This PR moves all the xnnpack specific interfces to a generic interface. Accordingly removes xnnpac specific reference from API and some variable names. What has not yet changed: TODO: USE_XNNPACK is still used. This can be removed where no XNNPACK specific things are done. e.g., RegisterOpContext.cpp and xnnpack_rewrite.cpp. Also the filename and structure also remains. Some of the generic class definition can be moved non-XNNPACK specific folder. Test Plan: python test/test_xnnpack_integration.py Imported from OSS Differential Revision: D20526416 fbshipit-source-id: 2e1725345c44bbb26bdc448097a7384eca121387
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1ff5d9c557
commit
e1c092fe3a
@ -460,19 +460,19 @@ void initJITBindings(PyObject* module) {
|
||||
return debugGetFusedKernelCode(g, inps);
|
||||
})
|
||||
.def(
|
||||
"_jit_pass_insert_xnnpack_ops",
|
||||
"_jit_pass_insert_prepacked_ops",
|
||||
[](std::shared_ptr<Graph>& graph) {
|
||||
return insertXNNPACKOps(graph);
|
||||
return insertPrePackedOps(graph);
|
||||
})
|
||||
.def(
|
||||
"_jit_pass_insert_xnnpack_ops",
|
||||
"_jit_pass_insert_prepacked_ops",
|
||||
[](script::Module& module) {
|
||||
return insertXNNPACKOps(module);
|
||||
return insertPrePackedOps(module);
|
||||
})
|
||||
.def(
|
||||
"_jit_pass_fold_xnnpack_prepack_ops",
|
||||
"_jit_pass_fold_prepacking_ops",
|
||||
[](script::Module& module) {
|
||||
return FoldXNNPACKPrePackingOps(module);
|
||||
return FoldPrePackingOps(module);
|
||||
})
|
||||
.def(
|
||||
"_jit_pass_onnx_unpack_quantized_weights",
|
||||
|
Reference in New Issue
Block a user