Compare commits

...

1 Commits

Author SHA1 Message Date
088fa93a1f enabling woq fusion path on acl 2025-10-20 08:00:46 +00:00
3 changed files with 11 additions and 9 deletions

View File

@ -1624,6 +1624,7 @@ test_linux_aarch64() {
inductor/test_split_cat_fx_passes inductor/test_compile inductor/test_torchinductor \
inductor/test_torchinductor_codegen_dynamic_shapes inductor/test_torchinductor_dynamic_shapes inductor/test_memory \
inductor/test_triton_cpu_backend inductor/test_triton_extension_backend inductor/test_mkldnn_pattern_matcher inductor/test_cpu_cpp_wrapper \
inductor/test_cpu_select_algorithm \
--shard "$SHARD_NUMBER" "$NUM_TEST_SHARDS" --verbose
}

View File

@ -4140,9 +4140,7 @@ class TestPatternMatcher(TestPatternMatcherBase):
s = torch.randn(s_shape, dtype=torch.bfloat16)
def matcher_check_fn():
self.assertEqual(
counters["inductor"]["woq_matcher_count"], 0 if TEST_ACL else 1
)
self.assertEqual(counters["inductor"]["woq_matcher_count"], 1)
self._test_common(
mod,

View File

@ -1524,17 +1524,20 @@ if torch._C._has_mkldnn:
def _mkldnn_fusion_init():
# TODO: aarch64: enable op fusion for acl once it supports fused operators. Disabling it for now.
# Otherwise even the matmul or innerproduct can not be accelerated with acl
if (
torch.backends.mkldnn.enabled
and torch.backends.mkldnn.is_available()
and not torch.ops.mkldnn._is_mkldnn_acl_supported()
):
mkldnn_ready = (
torch.backends.mkldnn.enabled and torch.backends.mkldnn.is_available()
)
if not mkldnn_ready:
return
if not torch.ops.mkldnn._is_mkldnn_acl_supported():
_register_unary_fusion()
_register_inplace_fusion()
_register_binary_unary_fusion()
_register_binary_fusion()
_register_quantization_lowerings()
_register_woq_lowerings()
_register_woq_lowerings()
@functools.cache
def _mkldnn_weight_pack_init():