Add flag to select enabled CPU targets
Note on testing: I've run ./tensorflow/tools/ci_build/ci_build.sh CPU.ARM64 bazel test on AArch64 on //tensorflow/core/... //tensorflow/tsl/... and //tensorflow/compiler/... and there was no regression. This looks good to me, but I'm not sure I'm the right person to review. I'll add @MichaelHudgins and @akuegel, hopefully one of them can review (or will know who to assign). Thanks for the PR! @vam-google would mind taking a look?  Hi @RoboTux Can you please check @akuegel's comments and keep us posted ? Thank you! > Hi @RoboTux Can you please check @akuegel's comments and keep us posted ? Thank you!

TL;DR: saw that, I was trying to understand the current default behavior, will rework the patch accordingly and change it to default to enable only the host architecture.

Yes sorry I saw that but I realized in https://github.com/tensorflow/tensorflow/issues/59595#issuecomment-1473725625 that I erroneously thought all targets are enabled by default currently which is not the case, only X86 and the host CPU are enabled by default. I delayed a bit to find the time to analyze why despite llvm_targets having all targets in @llvm-project it did not cause all targets to be enabled. It's down to the config_settings operating on the --cpu value in //tensorflow/tsl which I thought did not work as intended because of how it's documented in bazel as having an empty default:

https://bazel.build/reference/command-line-reference#flag--cpu

Best regards,
Thomas Ah, it seems there are some merge conflicts that need to be resolved. What commit message will be used when this land after I solve the conflicts? Will it use the original message or what I last forced pushed? @RoboTux I believe it will use the original message on the PR ("Default flag to current set of ...") > 

Oh, I'll fix the conflicts in a new PR then if you don't mind since this new version didn't add an option. I'll link it from here to help clarify things. I've just created https://github.com/tensorflow/tensorflow/pull/60161 which fixes the conflicts and contains an updated commit message.
Default flag to current set of support targets to keep the default of enabling all CPU targets. This fixes issue [#59595](https://github.com/tensorflow/tensorflow/issues/59595) as well as some confusiong around Host Vs Target.