pytorch / executorch

On-device AI across mobile, embedded and edge for PyTorch
https://pytorch.org/executorch/
Other
1.91k stars 312 forks source link

Unknown target `linux-x86_64` from package `prelude//os` when ./install_requirements.sh on WSL #4890

Closed python3kgae closed 1 month ago

python3kgae commented 1 month ago

๐Ÿ› Describe the bug

When running ./install_requirements.sh in WSL. Hit error

Command failed: Error looking up configured node root//kernels/optimized:generated_lib (prelude//platforms:default#904931f735703749)

Caused by: 0: Error looking up configured node root//kernels/optimized:generated_lib_combined (prelude//platforms:default#904931f735703749) 1: Error looking up configured node root//kernels/optimized:generated_lib_pt_oplist (prelude//platforms:default#904931f735703749) 2: Error looking up configured node root//kernels/optimized:optimized_operators (prelude//platforms:default#904931f735703749) 3: Error looking up configured node root//kernels/optimized/cpu:cpu_optimized (prelude//platforms:default#904931f735703749) 4: Error looking up configured node root//kernels/optimized/cpu:op_bmm (prelude//platforms:default#904931f735703749) 5: Error looking up configured node root//kernels/optimized:libblas (prelude//platforms:default#904931f735703749) 6: Error resolving configuration deps of root//kernels/optimized:libblas (prelude//platforms:default#904931f735703749) 7: Error getting configuration node of prelude//os:linux-x86_64 within the prelude//platforms:default#904931f735703749 configuration 8: Error running analysis for prelude//os:linux-x86_64 (<unbound>) 9: Error looking up configured node prelude//os:linux-x86_64 () 10: looking up unconfigured target node prelude//os:linux-x86_64 11: Unknown target linux-x86_64 from package prelude//os. Did you mean one of the 17 targets in prelude//os:BUCK.v2? Maybe you meant one of these similar targets? prelude//os:linux

CMake Error at build/Utils.cmake:201 (message): executorch: source list generation failed Call Stack (most recent call first): CMakeLists.txt:335 (extract_sources)

Could work around using

diff --git a/kernels/optimized/lib_defs.bzl b/kernels/optimized/lib_defs.bzl
index 045e86842..4eba7bbb4 100644
--- a/kernels/optimized/lib_defs.bzl
+++ b/kernels/optimized/lib_defs.bzl
@@ -115,7 +115,7 @@ def define_libs():
             ],
             preprocessor_flags = select({
                 "DEFAULT": [],
-                "ovr_config//os:linux-x86_64": [
+                "ovr_config//os:linux": [
                     "-DET_BUILD_WITH_BLAS",
                 ] if not runtime.is_oss else [],
             }),
@@ -144,7 +144,7 @@ def define_libs():
             ],
             deps = select({
                 "DEFAULT": [],
-                "ovr_config//os:linux-x86_64": [mkl_dep] if not runtime.is_oss else [],
+                "ovr_config//os:linux": [mkl_dep] if not runtime.is_oss else [],
             }),
             exported_deps = [
                 "//executorch/kernels/optimized:libutils",

Versions

Collecting environment information... PyTorch version: 2.5.0.dev20240821+cpu Is debug build: False CUDA used to build PyTorch: Could not collect ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64) GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Clang version: 14.0.0-1ubuntu1.1 CMake version: version 3.30.2 Libc version: glibc-2.35

Python version: 3.10.0 (default, Mar 3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime) Python platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Is CUDA available: False CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: N/A GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3070 Ti Nvidia driver version: 551.76 cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 64 On-line CPU(s) list: 0-63 Vendor ID: AuthenticAMD Model name: AMD Ryzen Threadripper PRO 3975WX 32-Cores CPU family: 23 Model: 49 Thread(s) per core: 2 Core(s) per socket: 32 Socket(s): 1 Stepping: 0 BogoMIPS: 6986.86 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ssbd ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip rdpid Virtualization: AMD-V Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 1 MiB (32 instances) L1i cache: 1 MiB (32 instances) L2 cache: 16 MiB (32 instances) L3 cache: 16 MiB (1 instance) Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Mitigation; untrained return thunk; SMT enabled with STIBP protection Vulnerability Spec rstack overflow: Mitigation; safe RET Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] numpy==1.26.4 [pip3] torch==2.5.0.dev20240821+cpu [pip3] torchaudio==2.4.0.dev20240821+cpu [pip3] torchsr==1.0.4 [pip3] torchvision==0.20.0.dev20240821+cpu [conda] numpy 1.26.4 pypi_0 pypi [conda] torch 2.5.0.dev20240821+cpu pypi_0 pypi [conda] torchaudio 2.4.0.dev20240821+cpu pypi_0 pypi [conda] torchsr 1.0.4 pypi_0 pypi [conda] torchvision 0.20.0.dev20240821+cpu pypi_0 pypi

dvorjackz commented 1 month ago

Hi @python3kgae, try rebasing on main?

python3kgae commented 1 month ago

Hi @python3kgae, try rebasing on main?

It works after rebasing on main.