Closed sbocconi closed 1 month ago
Hi @sbocconi! We wondered your torch installed from pip or conda? We strongly recommend use pip to install torch.
Hi @MILK-BIOS, the error is because on ARM architectures such as MacOS M2 FBGEMM is not supported, so apparently you need to use python tools/export.py --backend qnnpack
.
BTW, I have used pip to install torch.
Oh, glad to see you have solved the question! We need to make our code more compatiable.
Unfortunately the Mac M2 ARM is not well supported yet due to the fact that it is a new architecture. I had to do the following two changes to make it work:
export OMP_NUM_THREADS=1 && python tools/train.py <params>
Otherwise code hangsis_mps_available()
in mmengine/device/utils.py
to return always False
otherwise I get the following error:
TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
Maybe you can mention this in the documentation?
thank you, we will update the docs.
Describe the bug Trying to export the model with config
configs/pfld/pfld_mbv2n_112.py
fails withRuntimeError: quantized engine FBGEMM is not supported
Environment Environment you use when bug appears:python3 tools/export.py configs/pfld/pfld_mbv2n_112.py work_dirs/pfld_mbv2n_112/epoch_1.pth --target tflite --cfg-options data_root=datasets/meter/
Additional context Running on Mac M2, torch cpu-only, mmcv compiled from source