FBGEMM icon indicating copy to clipboard operation
FBGEMM copied to clipboard

compiling FBGEMM for ARM

Open vrnmthr opened this issue 2 years ago • 6 comments

I noticed that FBGEMM_GPU now supports ARM. Is there a plan for FBGEMM cpu to support ARM as well? I am trying to compile & run on an M1 mac.

vrnmthr avatar Oct 12 '23 22:10 vrnmthr

@q10 in #2157 you mentioned "We are currently working on ARM support for FBGEMM, which is incomplete at the moment.". Do you have a very rough ETA for this feature?

I am trying to understand if this will be ready in time to ship something, or we need to go ahead with alternatives like ruy. We would prefer to stick with FBGEMM if possible.

vrnmthr avatar Apr 24 '24 18:04 vrnmthr

Hi @vrnmthr, I would expect the FBGEMM main library to build on ARM sometime in 2024 H2. For now, I would suggest building the cpu-only version of FBGEMM-GPU and using that.

We have been actively working on optimizing some FBGEMM operators on ARM, such as TBE. However, building the full FBGEMM main library on ARM turned out to be much more complex as we tried this before (needing to completely disable AVX related routines for all operators during compile time or it will complain about "undefined reference" in link time or runtime), and we currently don't have enough time to focus on this.

excelle08 avatar Apr 24 '24 22:04 excelle08

Hi @excelle08 , glad to know ARM support is coming in 2024 H2. could you please elaborate the below suggestion? Does it support ARM CPU build with minimal kernels? otherwise what exactly does it provide?

For now, I would suggest building the cpu-only version of FBGEMM-GPU and using that.

snadampal avatar May 14 '24 20:05 snadampal

Can the vcpkg port be looked into, it fails to build on ARM and needs to update to the latest ASMJIT. The source here seems to already support the latest asmjit so just need to PR vcpkg. This would help the asmjit port update go through faster https://github.com/microsoft/vcpkg/pull/39090

stevemk14ebr avatar Jun 04 '24 13:06 stevemk14ebr

Bumping this. Is there an update?

From some of the more recent PRs (i.e. https://github.com/pytorch/FBGEMM/pull/4068, https://github.com/pytorch/FBGEMM/pull/4091, https://github.com/pytorch/FBGEMM/pull/3424, etc) it seems this is being worked on.

BwL1289 avatar May 11 '25 22:05 BwL1289

Also linking https://github.com/pytorch/FBGEMM/pull/2128 as it seems relevant

BwL1289 avatar May 12 '25 18:05 BwL1289