ChatGLM-6B icon indicating copy to clipboard operation
ChatGLM-6B copied to clipboard

[BUG/Help] <title>LLVM ERROR: Failed to infer result type(s).

Open risetoday opened this issue 1 year ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

loc("varianceEps"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":228:0)): error: input types 'tensor<1x4x1xf16>' and 'tensor<1xf32>' are not broadcast compatible LLVM ERROR: Failed to infer result type(s).

Expected Behavior

No response

Steps To Reproduce

 active environment : chatglm-6b
active env location : /Users/jessica/anaconda3/envs/chatglm-6b
        shell level : 2
   user config file : /Users/jessica/.condarc

populated config files : /Users/jessica/.condarc conda version : 23.3.1 conda-build version : 3.24.0 python version : 3.10.9.final.0 virtual packages : __archspec=1=arm64 __osx=13.3.1=0 __unix=0=0 base environment : /Users/jessica/anaconda3 (writable) conda av data dir : /Users/jessica/anaconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-arm64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/jessica/anaconda3/pkgs /Users/jessica/.conda/pkgs envs directories : /Users/jessica/anaconda3/envs /Users/jessica/.conda/envs platform : osx-arm64 user-agent : conda/23.3.1 requests/2.28.1 CPython/3.10.9 Darwin/22.4.0 OSX/13.3.1 UID:GID : 501:20 netrc file : None offline mode : False

Environment

- OS:osx-arm64
- Python:3.10
- Transformers:4.27.1
- PyTorch:2.0.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :

Anything else?

No response

risetoday avatar May 07 '23 21:05 risetoday

Hey !

I have the same problem ... Did you fix it ?

Moltes74 avatar May 11 '23 07:05 Moltes74

same error =(

XFLOWofficial avatar May 14 '23 14:05 XFLOWofficial

same error =(

lemon-simple avatar May 20 '23 03:05 lemon-simple

有人知道如何解决吗?

lemon-simple avatar May 20 '23 03:05 lemon-simple

same issue

Zalberth avatar May 28 '23 00:05 Zalberth

You need to install PyTorch-nightly to use MPS backend. PyTorch 2.0 is not enough.

duzx16 avatar May 28 '23 03:05 duzx16

pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu

riverlover avatar Jun 04 '23 08:06 riverlover

pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu

我使用了这个方法,没有这个错误了,棒

faritor avatar Jun 14 '23 15:06 faritor

try the final ultra :!!! pip3 install --prefer-binary accelerate transformers diffusers einops pytorch-lightning torchsde safetensors torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch

zdxpan avatar Jun 17 '23 15:06 zdxpan

you need to uninstall torch torchvision torchaudio first, and then run pip3 install --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cpu

fg0521 avatar Aug 09 '23 07:08 fg0521