From 163b2bc26a1f1451064ac71ac8bc4548da73cd86 Mon Sep 17 00:00:00 2001 From: chenyu Date: Thu, 16 Nov 2023 12:52:13 -0500 Subject: [PATCH] wgpu.utils._device -> wgpu.utils.device (#2330) * wgpu.utils._device -> wgpu.utils.device * can i do this? * no need to specify metal --- .github/workflows/test.yml | 2 +- setup.py | 2 +- tinygrad/runtime/ops_webgpu.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e90f1a8..ef05cb25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -217,7 +217,7 @@ jobs: path: ${{ env.Python3_ROOT_DIR }}/lib/python3.11/site-packages key: metal-webgpu-testing-packages-${{ hashFiles('**/setup.py') }} - name: Install Dependencies - run: pip install -e '.[metal,webgpu,testing]' --extra-index-url https://download.pytorch.org/whl/cpu + run: pip install -e '.[webgpu,testing]' --extra-index-url https://download.pytorch.org/whl/cpu - name: Cache model weights uses: actions/cache@v3 with: diff --git a/setup.py b/setup.py index 69b82e64..b411371f 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ setup(name='tinygrad', 'cuda': ["pycuda"], 'arm': ["unicorn"], 'triton': ["triton-nightly>=2.1.0.dev20231014192330", "pycuda"], - 'webgpu': ["wgpu"], + 'webgpu': ["wgpu>=v0.12.0"], 'linting': [ "flake8", "pylint", diff --git a/tinygrad/runtime/ops_webgpu.py b/tinygrad/runtime/ops_webgpu.py index d9d43a33..319b2018 100644 --- a/tinygrad/runtime/ops_webgpu.py +++ b/tinygrad/runtime/ops_webgpu.py @@ -1,6 +1,6 @@ import numpy as np import functools -from wgpu.utils._device import get_default_device +from wgpu.utils.device import get_default_device from tinygrad.runtime.lib import RawBufferCopyIn, LRUAllocator from tinygrad.helpers import dtypes, DType from tinygrad.ops import Compiled