Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions kernels/portable/cpu/op_constant_pad_nd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ void apply_padding_to_dim(
size_t copy_nbytes = copy_len * sizeof(CTYPE);

if (copy_nbytes > 0) {
// Check that out_data and self_data do not overlap.
ET_KERNEL_CHECK_MSG(
ctx,
out_data != self_data &&
((out_data + copy_len < self_data) ||
(self_data + copy_len < out_data)),
InvalidArgument,
/* void */,
"Out tensor overlaps with the input tensor. This is not supported.");
memcpy(out_data, self_data, copy_nbytes);
out_data += copy_len;
self_data += copy_len;
Expand Down
149 changes: 0 additions & 149 deletions kernels/portable/cpu/op_linear_scratch_example.cpp

This file was deleted.

5 changes: 0 additions & 5 deletions kernels/portable/custom_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@
kernels:
- arg_meta: null
kernel_name: torch::executor::allclose_tensor

- func: linear.scratch_example(Tensor input, Tensor weight, Tensor? bias=None, *, Tensor(a!) out, Tensor(b!) _scratch_tensor) -> Tensor(a!)
kernels:
- arg_meta: null
kernel_name: torch::executor::linear_scratch_example
1 change: 0 additions & 1 deletion shim_et/xplat/executorch/build/build_variables.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ PORTABLE_KERNELS_SRCS = [
"kernels/portable/cpu/op_le.cpp",
"kernels/portable/cpu/op_leaky_relu.cpp",
"kernels/portable/cpu/op_lift_fresh_copy.cpp",
"kernels/portable/cpu/op_linear_scratch_example.cpp",
"kernels/portable/cpu/op_log.cpp",
"kernels/portable/cpu/op_log10.cpp",
"kernels/portable/cpu/op_log1p.cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1367,9 +1367,6 @@ CUSTOM_OPS = (
op_target(
name = "op_allclose",
),
op_target(
name = "op_linear_scratch_example",
),
)

def portable_source_list():
Expand Down
Loading