Skip to content
Merged
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
8 changes: 4 additions & 4 deletions runtime/executor/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,14 @@ Method::set_input(const EValue& input_evalue, size_t input_idx) {
if (e.isTensor()) {
const auto& t_dst = e.toTensor();
const auto& t_src = input_evalue.toTensor();

ET_CHECK_OR_RETURN_ERROR(
t_dst.scalar_type() == t_src.scalar_type(),
InvalidArgument,
"The %zu-th input tensor's scalartype does not meet requirement: found %" PRId8
" but expected %" PRId8,
"Input %zu has unexpected scalar type: expected %s but was %s.",
input_idx,
static_cast<int8_t>(t_src.scalar_type()),
static_cast<int8_t>(t_dst.scalar_type()));
executorch::runtime::toString(t_dst.scalar_type()),
executorch::runtime::toString(t_src.scalar_type()));
// Reset the shape for the Method's input as the size of forwarded input
// tensor for shape dynamism. Also is a safety check if need memcpy.
Error err = resize_tensor(t_dst, t_src.sizes());
Expand Down
1 change: 1 addition & 0 deletions runtime/executor/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def define_common_targets():
"//executorch/runtime/core:evalue" + aten_suffix,
"//executorch/runtime/core:event_tracer" + aten_suffix,
"//executorch/runtime/core/exec_aten:lib" + aten_suffix,
"//executorch/runtime/core/exec_aten/util:scalar_type_util" + aten_suffix,
"//executorch/runtime/core/exec_aten/util:tensor_util" + aten_suffix,
"//executorch/runtime/kernel:kernel_runtime_context" + aten_suffix,
"//executorch/runtime/kernel:operator_registry",
Expand Down