diff --git a/setup.py b/setup.py index 3977705941..2e9152a13a 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ setup(name='tinygrad', "bottle", "ggml-python" ], - 'webgpu': ["wgpu==v0.18.1"], + 'webgpu': ["wgpu"], 'docs': [ "mkdocs", "mkdocs-material", diff --git a/tinygrad/runtime/ops_webgpu.py b/tinygrad/runtime/ops_webgpu.py index 5a2e33c014..0e61c2553a 100644 --- a/tinygrad/runtime/ops_webgpu.py +++ b/tinygrad/runtime/ops_webgpu.py @@ -58,8 +58,8 @@ class WebGpuAllocator(Allocator): class WebGpuDevice(Compiled): def __init__(self, device:str): - adapter = wgpu.gpu.request_adapter(power_preference="high-performance") + adapter = wgpu.gpu.request_adapter_sync(power_preference="high-performance") timestamp_supported = wgpu.FeatureName.timestamp_query in adapter.features - wgpu_device = adapter.request_device(required_features=[wgpu.FeatureName.timestamp_query] if timestamp_supported else []) + wgpu_device = adapter.request_device_sync(required_features=[wgpu.FeatureName.timestamp_query] if timestamp_supported else []) super().__init__(device, WebGpuAllocator(wgpu_device), WGSLRenderer(), Compiler(), functools.partial(WebGPUProgram, (wgpu_device, timestamp_supported)))