pytorch / executorch

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

/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:54:25: error: unknown register name '%ymm0' in asm. #6691

Open AkiSakurai opened 6 days ago

AkiSakurai commented 6 days ago

šŸ› Describe the bug

https://pytorch.org/executorch/stable/apple-runtime.html
./build/build_apple_frameworks.sh --coreml --custom --mps --optimized --portable --quantized --xnnpack

Follow the instructions. The below errors occurred.

  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -ivfsstatcache /var/folders/cr/_c7qp0qd7tnfkkbp29176hl00000gn/C/com.apple.DeveloperTools/15.3-15E204a/Xcode/SDKStatCaches.noindex/macosx14.4-23E208-13f6e737bddbb37f317b3579f3535bf5.sdkstatcache -fmessage-length\=210 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -Wno-deprecated-declarations @/Users/aki/Desktop/executorch/cmake-out/macos/build/custom_ops.build/Release/Objects-normal/arm64/7187679823f38a2a940e0043cdf9d637-common-args.resp -MMD -MT dependencies -MF /Users/aki/Desktop/executorch/cmake-out/macos/build/custom_ops.build/Release/Objects-normal/arm64/fht_avx.d --serialize-diagnostics /Users/aki/Desktop/executorch/cmake-out/macos/build/custom_ops.build/Release/Objects-normal/arm64/fht_avx.dia -c /Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c -o /Users/aki/Desktop/executorch/cmake-out/macos/build/custom_ops.build/Release/Objects-normal/arm64/fht_avx.o
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:54:25: error: unknown register name '%ymm0' in asm
      :: "r"(buf + j) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10", "%ymm11", "%ymm12", "%ymm13", "%ymm14", "%ymm15", "memory"
                        ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:101:57: error: unknown register name '%ymm0' in asm
        :: "r"(buf + j + k + 0), "r"(buf + j + k + 8) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10", "%ymm11", "%ymm12", "%ymm13", "%ymm14", "%ymm1...
                                                        ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:191:103: error: unknown register name '%ymm0' in asm
        :: "r"(buf + j + k + 0), "r"(buf + j + k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10", ...
                                                                                                      ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:369:195: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:548:197: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:561:60: error: unknown register name '%ymm0' in asm
          :: "r"(buf + j + k + 0), "r"(buf + j + k + 64) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10", "%ymm11", "%ymm12", "%ymm13", "%ymm14", "%y...
                                                           ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:746:197: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:776:108: error: unknown register name '%ymm0' in asm
          :: "r"(buf + j + k + 0), "r"(buf + j + k + 64), "r"(buf + j + k + 128), "r"(buf + j + k + 192) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm...
                                                                                                           ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:960:195: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1007:202: error: unknown register name '%ymm0' in asm
  ...+ 64), "r"(buf + j + k + 128), "r"(buf + j + k + 192), "r"(buf + j + k + 256), "r"(buf + j + k + 320), "r"(buf + j + k + 384), "r"(buf + j + k + 448) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm...
                                                                                                                                                             ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1186:197: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1233:204: error: unknown register name '%ymm0' in asm
  ...+ 64), "r"(buf + j + k + 128), "r"(buf + j + k + 192), "r"(buf + j + k + 256), "r"(buf + j + k + 320), "r"(buf + j + k + 384), "r"(buf + j + k + 448) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm...
                                                                                                                                                             ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1246:61: error: unknown register name '%ymm0' in asm
          :: "r"(buf + j + k + 0), "r"(buf + j + k + 512) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%ymm10", "%ymm11", "%ymm12", "%ymm13", "%ymm14", "%...
                                                            ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1431:197: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1478:204: error: unknown register name '%ymm0' in asm
  ...+ 64), "r"(buf + j + k + 128), "r"(buf + j + k + 192), "r"(buf + j + k + 256), "r"(buf + j + k + 320), "r"(buf + j + k + 384), "r"(buf + j + k + 448) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm...
                                                                                                                                                             ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1501:111: error: unknown register name '%ymm0' in asm
          :: "r"(buf + j + k + 0), "r"(buf + j + k + 512), "r"(buf + j + k + 1024), "r"(buf + j + k + 1536) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", "%ymm8", "%ymm9", "%...
                                                                                                              ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1685:195: error: unknown register name '%ymm0' in asm
  ...+ k + 8), "r"(buf + j + k + 16), "r"(buf + j + k + 24), "r"(buf + j + k + 32), "r"(buf + j + k + 40), "r"(buf + j + k + 48), "r"(buf + j + k + 56) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5"...
                                                                                                                                                          ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1732:202: error: unknown register name '%ymm0' in asm
  ...+ 64), "r"(buf + j + k + 128), "r"(buf + j + k + 192), "r"(buf + j + k + 256), "r"(buf + j + k + 320), "r"(buf + j + k + 384), "r"(buf + j + k + 448) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm...
                                                                                                                                                             ^
/Users/aki/Desktop/executorch/extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c:1779:209: error: unknown register name '%ymm0' in asm
  ..."r"(buf + j + k + 1024), "r"(buf + j + k + 1536), "r"(buf + j + k + 2048), "r"(buf + j + k + 2560), "r"(buf + j + k + 3072), "r"(buf + j + k + 3584) : "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5...
                                                                                                                                                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Versions

Collecting environment information...
PyTorch version: 2.6.0a0+gitd622b49
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 15.1 (x86_64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.30.3
Libc version: N/A

Python version: 3.11.1 (v3.11.1:a7a450f84a, Dec  6 2022, 15:24:06) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)
Python platform: macOS-15.1-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz

Versions of relevant libraries:
[pip3] flake8==6.1.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-comprehensions==3.12.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] mypy==1.9.0
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.0
[pip3] optree==0.11.0
[pip3] torch==2.2.2
[pip3] torchvision==0.17.2
[conda] clip-anytorch             2.5.0                    pypi_0    pypi
[conda] numpy                     1.23.5                   pypi_0    pypi
[conda] optree                    0.10.0                   pypi_0    pypi
[conda] pytorch-lightning         2.0.1                    pypi_0    pypi
[conda] torch                     2.1.0.dev20230310          pypi_0    pypi
[conda] torchaudio                2.0.0.dev20230310          pypi_0    pypi
[conda] torchdiffeq               0.2.3                    pypi_0    pypi
[conda] torchmetrics              0.11.4                   pypi_0    pypi
[conda] torchsde                  0.2.5                    pypi_0    pypi
AkiSakurai commented 6 days ago

There are no platform arguments passed in, so it assumes x64. https://github.com/pytorch/executorch/blob/17ad8d3f69d365a77dda590e1d40497befaa6b69/build/Utils.cmake#L190-L208

JacobSzwejbka commented 5 hours ago

@helunwencser @GregoryComer can you take a look?