pytorch - ✅(Solved) Fix AArch64 Unit Test Failure - test/jit/test_freezing.py TestFreezing.test_module_with_shared_type_instances [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#177258Fetched 2026-04-08 00:42:34
View on GitHub
Comments
2
Participants
2
Timeline
63
Reactions
0
Timeline (top)
mentioned ×19subscribed ×19referenced ×15labeled ×6

Error Message

Traceback (most recent call last): File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1475, in test_module_with_shared_type_instances m = _static_quant(m) File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1469, in _static_quant torch.ao.quantization.convert(qModel, inplace=True) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/typing_extensions.py", line 2853, in wrapper return arg(*args, **kwargs) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 669, in convert _convert( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 726, in _convert _convert( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 734, in _convert reassign[name] = swap_module( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 779, in swap_module new_mod = qmod.from_float( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 606, in from_float return _ConvNd.from_float( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 320, in from_float return cls.get_qconv(mod, activation_post_process, weight_post_process) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 258, in get_qconv qconv = cls( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 547, in init super()._init( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 118, in _init self.set_weight_bias(qweight, bias_float) File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 567, in set_weight_bias self._packed_params = torch.ops.quantized.conv2d_prepack( File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_ops.py", line 1275, in call return self._op(*args, **kwargs) RuntimeError: unknown architecure

To execute this test, run the following from the base repo dir: python test/jit/test_freezing.py TestFreezing.test_module_with_shared_type_instances

Fix Action

Fixed

PR fix notes

PR #177584: Add AArch64 xfails for inductor, nn, jit, and linalg tests

Description (problem / solution / changelog)

Stack from ghstack (oldest at bottom):

  • -> #177584

This PR marks all known unit test failures for AArch64 as xfail or skip with a small code comment referencing the github issues. The test files affected are also added to the linux-aarch64 unit test suite.

Once this PR has been merged we should be able to run ALL unit tests on all AArch64 cpus without any reported failures ( this will be a follow up PR ).

Related PRs #177243, #177244, #177245, #177247, #177249, #177250, #177251, #177254, #177255, #177258, #177264, #170787, #146483, #177327

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @fadara01 @aditew01 @nikhil-arm @milpuz01

Changed files

  • .ci/pytorch/test.sh (modified, +3/-0)
  • test/inductor/test_aot_inductor.py (modified, +7/-0)
  • test/inductor/test_cpu_repro.py (modified, +8/-0)
  • test/inductor/test_cpu_select_algorithm.py (modified, +8/-0)
  • test/inductor/test_fused_attention.py (modified, +14/-3)
  • test/inductor/test_torchinductor.py (modified, +5/-1)
  • test/inductor/test_torchinductor_opinfo.py (modified, +6/-2)
  • test/jit/test_freezing.py (modified, +4/-0)
  • test/nn/test_convolution.py (modified, +6/-0)
  • test/test_jit.py (modified, +4/-2)
  • test/test_jit_autocast.py (modified, +13/-1)
  • test/test_nn.py (modified, +4/-1)
  • torch/testing/_internal/common_methods_invocations.py (modified, +11/-0)
  • torch/testing/_internal/opinfo/definitions/linalg.py (modified, +21/-0)

Code Example

Traceback (most recent call last):
  File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1475, in test_module_with_shared_type_instances
    m = _static_quant(m)
  File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1469, in _static_quant
    torch.ao.quantization.convert(qModel, inplace=True)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/typing_extensions.py", line 2853, in wrapper
    return arg(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 669, in convert
    _convert(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 726, in _convert
    _convert(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 734, in _convert
    reassign[name] = swap_module(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 779, in swap_module
    new_mod = qmod.from_float(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 606, in from_float
    return _ConvNd.from_float(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 320, in from_float
    return cls.get_qconv(mod, activation_post_process, weight_post_process)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 258, in get_qconv
    qconv = cls(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 547, in __init__
    super()._init(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 118, in _init
    self.set_weight_bias(qweight, bias_float)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 567, in set_weight_bias
    self._packed_params = torch.ops.quantized.conv2d_prepack(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_ops.py", line 1275, in __call__
    return self._op(*args, **kwargs)
RuntimeError: unknown architecure

To execute this test, run the following from the base repo dir:
    python test/jit/test_freezing.py TestFreezing.test_module_with_shared_type_instances
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

StackTrace

Traceback (most recent call last):
  File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1475, in test_module_with_shared_type_instances
    m = _static_quant(m)
  File "/builds/software-machine-learning-infra-frameworks-workspaces-robhar02/pytorch/test/jit/test_freezing.py", line 1469, in _static_quant
    torch.ao.quantization.convert(qModel, inplace=True)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/typing_extensions.py", line 2853, in wrapper
    return arg(*args, **kwargs)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 669, in convert
    _convert(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 726, in _convert
    _convert(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 734, in _convert
    reassign[name] = swap_module(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/quantization/quantize.py", line 779, in swap_module
    new_mod = qmod.from_float(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 606, in from_float
    return _ConvNd.from_float(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 320, in from_float
    return cls.get_qconv(mod, activation_post_process, weight_post_process)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 258, in get_qconv
    qconv = cls(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 547, in __init__
    super()._init(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 118, in _init
    self.set_weight_bias(qweight, bias_float)
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/ao/nn/quantized/modules/conv.py", line 567, in set_weight_bias
    self._packed_params = torch.ops.quantized.conv2d_prepack(
  File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/torch/_ops.py", line 1275, in __call__
    return self._op(*args, **kwargs)
RuntimeError: unknown architecure

To execute this test, run the following from the base repo dir:
    python test/jit/test_freezing.py TestFreezing.test_module_with_shared_type_instances

Possibly the same issue as https://github.com/pytorch/pytorch/issues/177254

Affects Neoverse N1 and V1

Versions

Commit - https://github.com/pytorch/pytorch/commit/08b6f48d871affbc7abe9277020aed882fdf110a

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @mruberry @snadampal @milpuz01 @aditew01 @nikhil-arm @fadara01 @nWEIdia @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @Xia-Weiwen @leslie-fang-intel

extent analysis

Fix Plan

The fix involves updating the PyTorch version to a newer one where the issue is resolved.

  • Update PyTorch to the latest version using pip:

pip install --upgrade torch

* Alternatively, if you are using a conda environment, update PyTorch using conda:
  ```bash
conda update pytorch
  • If the issue persists, try updating the torchvision package as well:

pip install --upgrade torchvision

  or
  ```bash
conda update torchvision
  • Verify that the torch and torchvision versions are up-to-date by checking the versions:

import torch import torchvision print(torch.version) print(torchvision.version)


### Verification
To verify that the fix worked, re-run the test that was failing:
```bash
python test/jit/test_freezing.py TestFreezing.test_module_with_shared_type_instances

If the test passes, the issue is resolved.

Extra Tips

  • Make sure to update all dependent packages to ensure compatibility with the new PyTorch version.
  • If you are using a specific PyTorch version for a project, consider creating a virtual environment to isolate the dependencies and avoid version conflicts.
  • Keep an eye on the PyTorch issue tracker for any updates related to this issue: https://github.com/pytorch/pytorch/issues/177254

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING