[caffe2] Use arch_deps instead of host info for arch-specific deps (#80814)

Test Plan: CI

Reviewed By: psaab

Differential Revision: D37588154

topic: not user facing

Pull Request resolved: https://github.com/pytorch/pytorch/pull/80814
Approved by: https://github.com/mehtanirav
This commit is contained in:
Andrew Gallagher
2022-07-06 23:42:57 +00:00
committed by PyTorch MergeBot
parent e08026d4d4
commit 74b41af2ad

View File

@ -1,19 +1,20 @@
def get_sleef_deps():
return [("sleef", None, "sleef")] if not (host_info().arch.is_aarch64) else []
def get_blas_gomp_deps():
if host_info().arch.is_x86_64:
return [(
"IntelComposerXE",
None,
native.read_config("fbcode", "mkl_lp64", "mkl_lp64_omp"),
)]
if host_info().arch.is_aarch64:
def get_sleef_arch_deps():
return [
("OpenBLAS", None, "OpenBLAS"),
("openmp", None, "omp"),
("x86_64", [
"third-party//sleef:sleef",
]),
]
def get_blas_gomp_arch_deps():
return [
("x86_64", [
"third-party//IntelComposerXE:{}".format(native.read_config("fbcode", "mkl_lp64", "mkl_lp64_omp")),
]),
("aarch64", [
"third-party//OpenBLAS:OpenBLAS",
"third-party//openmp:omp",
]),
]
fail("Unsupported architecture")
default_compiler_flags = [
"-Wall",