Skip to content

Commit 3a5f603

Browse files
committed
Update
[ghstack-poisoned]
1 parent cbe3baa commit 3a5f603

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

backends/webgpu/test/native/test_scratch_buffer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ std::vector<float> readback(
7070
std::vector<float> out(nbytes / sizeof(float));
7171
if (cb.status.load(std::memory_order_acquire) == WGPUMapAsyncStatus_Success) {
7272
const void* m = wgpuBufferGetConstMappedRange(staging, 0, nbytes);
73-
std::memcpy(out.data(), m, nbytes);
73+
if (m != nullptr) {
74+
std::memcpy(out.data(), m, nbytes);
75+
}
7476
wgpuBufferUnmap(staging);
7577
}
7678
wgpuBufferRelease(staging);

backends/webgpu/test/ops/dispatch_order/test_dispatch_order.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import torch
1919
from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner
2020
from executorch.backends.webgpu.test.ops.rms_norm.test_rms_norm import RmsNormModule
21+
from executorch.backends.webgpu.test.tester import WEBGPU_SUPPORTED_OPS
2122
from executorch.exir import to_edge_transform_and_lower
2223

2324

@@ -73,7 +74,8 @@ def _model(kind: str, shape, depth: int) -> torch.nn.Module:
7374
def _lower(model: torch.nn.Module, x: torch.Tensor):
7475
ep = torch.export.export(model, (x,))
7576
return to_edge_transform_and_lower(
76-
ep, partitioner=[VulkanPartitioner()]
77+
ep,
78+
partitioner=[VulkanPartitioner(operator_allowlist=WEBGPU_SUPPORTED_OPS)],
7779
).to_executorch()
7880

7981

backends/webgpu/test/tester.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# Edge ops the WebGPU runtime implements; restricts the Vulkan partitioner.
2121
WEBGPU_SUPPORTED_OPS = [
2222
exir_ops.edge.aten.add.Tensor,
23+
exir_ops.edge.et_vk.rms_norm.default,
2324
]
2425

2526

0 commit comments

Comments
 (0)