mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[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:
committed by
PyTorch MergeBot
parent
e08026d4d4
commit
74b41af2ad
29
defs.bzl
29
defs.bzl
@ -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",
|
||||
|
Reference in New Issue
Block a user