mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-02-16 09:37:11 -05:00
Bump back wgpu to latest (#8179)
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user