diff --git a/.github/actions/setup-tinygrad/action.yml b/.github/actions/setup-tinygrad/action.yml index 9e64003107..caf38cc73e 100644 --- a/.github/actions/setup-tinygrad/action.yml +++ b/.github/actions/setup-tinygrad/action.yml @@ -129,7 +129,7 @@ runs: shell: bash run: | wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc - echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-19 main" | sudo tee /etc/apt/sources.list.d/llvm.list + echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-20 main" | sudo tee /etc/apt/sources.list.d/llvm.list - name: apt-get update + install if: runner.os == 'Linux' && (inputs.opencl == 'true' || inputs.amd == 'true' || inputs.cuda == 'true' || inputs.webgpu == 'true' || inputs.llvm == 'true') @@ -162,7 +162,7 @@ runs: fi # **** LLVM **** if [[ "${{ inputs.llvm }}" == "true" ]]; then - pkgs+=" libllvm19 clang-19 lld-19" + pkgs+=" libllvm20 clang-20 lld-20" fi # ******** do install ******** @@ -246,4 +246,4 @@ runs: - name: Install LLVM (macOS) if: inputs.llvm == 'true' && runner.os == 'macOS' shell: bash - run: brew install llvm@19 + run: brew install llvm@20 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9dfe315d0..a19a212a98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -578,7 +578,7 @@ jobs: - name: Run test_tiny on DSP run: DEBUG=2 DSP=1 python test/test_tiny.py - name: Test transcendentals - run: CC=clang-19 PYTHONPATH="." DEBUG=2 DSP=1 python test/test_transcendental.py TestTranscendentalVectorized + run: CC=clang-20 PYTHONPATH="." DEBUG=2 DSP=1 python test/test_transcendental.py TestTranscendentalVectorized - name: Test quantize onnx run: PYTHONPATH="." DEBUG=2 DSP=1 python3 test/test_quantize_onnx.py - name: Test LLVM=1 DEVECTORIZE=0 diff --git a/tinygrad/runtime/support/llvm.py b/tinygrad/runtime/support/llvm.py index bb1490e583..d20de02a67 100644 --- a/tinygrad/runtime/support/llvm.py +++ b/tinygrad/runtime/support/llvm.py @@ -10,13 +10,13 @@ if sys.platform == 'win32': elif OSX: # Will raise FileNotFoundError if brew is not installed # `brew --prefix` will return even if formula is not installed - if not os.path.exists(brew_prefix:=subprocess.check_output(['brew', '--prefix', 'llvm@19']).decode().strip()): - raise FileNotFoundError('LLVM not found, you can install it with `brew install llvm@19`') + if not os.path.exists(brew_prefix:=subprocess.check_output(['brew', '--prefix', 'llvm@20']).decode().strip()): + raise FileNotFoundError('LLVM not found, you can install it with `brew install llvm@20`') LLVM_PATH: str|None = os.path.join(brew_prefix, 'lib', 'libLLVM.dylib') else: LLVM_PATH = ctypes.util.find_library('LLVM') # use newer LLVM if possible - for ver in reversed(range(14, 19+1)): + for ver in reversed(range(14, 20+1)): if LLVM_PATH is not None: break LLVM_PATH = ctypes.util.find_library(f'LLVM-{ver}') if LLVM_PATH is None: