mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
feat: bump to llvm20 (#10784)
This commit is contained in:
6
.github/actions/setup-tinygrad/action.yml
vendored
6
.github/actions/setup-tinygrad/action.yml
vendored
@@ -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
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user