Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backends/webgpu/runtime/ops/view_copy/ViewCopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,17 @@ void view_copy_impl(WebGPUGraph& graph, const std::vector<int>& args) {
add_flat_copy(graph, args.at(0), args.at(args.size() - 1));
}

// clone = flat copy; survives Vulkan RemoveRedundantOpsTransform in Llama 1B.
void clone_impl(WebGPUGraph& graph, const std::vector<int>& args) {
// args: [self, memory_format?, out]; out = last value-id.
add_flat_copy(graph, args.at(0), args.at(args.size() - 1));
}

} // namespace

WEBGPU_REGISTER_OPERATORS {
WEBGPU_REGISTER_OP(aten.view_copy.default, view_copy_impl);
WEBGPU_REGISTER_OP(aten.clone.default, clone_impl);
}

} // namespace executorch::backends::webgpu
Loading