xla icon indicating copy to clipboard operation
xla copied to clipboard

[xla][cpu] Add Arm Compute Library (ACL) build option for torch-xla

Open snadampal opened this issue 3 years ago • 10 comments

ACL build support has been added under the build flag: XLA_CPU_USE_ACL

This will enable the acl runtime for xla once the below tensorflow/xla PR is merged. https://github.com/tensorflow/tensorflow/pull/55534/commits

snadampal avatar Apr 29 '22 04:04 snadampal

Want to make sure that this flag is harmless(seems like that's the case) without corresponding tf change. We update tf version manually, next update will happens in couple weeks.

JackCaoG avatar Apr 29 '22 17:04 JackCaoG

Hi @JackCaoG, yes, the acl build flag takes effect only when the tf changes are merged. Even then it is guarded it under the "XLA_CPU_USE_ACL" build option, so, it wouldn't trigger the acl build unless wheel/docker/manual build explicitly sets it.

snadampal avatar Apr 29 '22 17:04 snadampal

@yeounoh FYI

JackCaoG avatar Apr 29 '22 17:04 JackCaoG

Thanks, we can merge this one when tf one merged and test it next time we update tf.

JackCaoG avatar Apr 29 '22 20:04 JackCaoG

Hi @JackCaoG , TensorFlow xla PR got merged.

snadampal avatar Jul 04 '22 05:07 snadampal

Hi @JackCaoG , please let me know if there are any other dependencies for this PR. Thank you!

snadampal avatar Jul 12 '22 23:07 snadampal

@snadampal Sorry for the delay. This pr is blocked on our tf pin update. We wants to update it but tf has moved to c++17 while pytorch stay in c++14. This creates a bunch of compilation issue we are trying to resolve. Will merge this one when tf pin update happens.

JackCaoG avatar Jul 12 '22 23:07 JackCaoG

Thanks, @JackCaoG!

snadampal avatar Jul 13 '22 00:07 snadampal

Just a quick update, we are still blocked by pytorch to do the tf pin update. The collaboration is ongoing, I will update here when we got is solved.

JackCaoG avatar Jul 22 '22 19:07 JackCaoG

@JackCaoG Thanks for the update!

snadampal avatar Jul 23 '22 18:07 snadampal

Hi @JackCaoG , can this PR be targeted for the upcoming release, PyTorch 1.13.0?

snadampal avatar Aug 16 '22 22:08 snadampal

sure, sorry for the delay. We just updated the tf pin to 06/22 but it seems like your pr merged to tf in 06/29. We are doing another tf pin update this week. @wonjoolee95 FYI.

I think you have done manual testing to make sure this options works so I am not too worried about that. I will make sure 1.13 has this change(and the corresponding tf version that can actually build with ACL)

JackCaoG avatar Aug 16 '22 22:08 JackCaoG

@snadampal Sorry for the delay, this c++17 thing is especially difficult, we usually do monthly tf update but this time we are almost 2 months behind.. trying to catch up.

JackCaoG avatar Aug 16 '22 22:08 JackCaoG

thanks, @JackCaoG .

snadampal avatar Aug 16 '22 22:08 snadampal

@snadampal Let's rebase this pr. You can build pt/xla with the new flag and see if it works for you. After you confirm it builds, I can merge this pr.

Note before building you want to run

pytorch/xla# ./scripts/apply_patches.sh 

to apply some tf patches

JackCaoG avatar Sep 20 '22 23:09 JackCaoG

Hi @JackCaoG , I've rebased and tested the pr on top of below commits, the feature is working as expected.

pytorch: commit d7029fea5113468441cb358bced6045e6e4d4b9a xla: commit 4226edb6d303cb9bdf4968a734269086aa278030

snadampal avatar Sep 21 '22 11:09 snadampal

@JackCaoG , thanks for merging the pr!

snadampal avatar Sep 21 '22 17:09 snadampal