Skip to content
Closed
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
15 changes: 14 additions & 1 deletion runtime/core/targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def define_common_targets():
"defines.h",
"error.h",
"freeable_buffer.h",
"named_data_map.h",
"result.h",
"span.h",
],
Expand Down Expand Up @@ -133,6 +132,20 @@ def define_common_targets():
],
)

runtime.cxx_library(
name = "named_data_map",
exported_headers = [
"named_data_map.h",
],
visibility = [
"//executorch/...",
"@EXECUTORCH_CLIENTS",
],
exported_deps = [
":tensor_layout",
],
)

runtime.cxx_library(
name = "tensor_layout",
srcs = ["tensor_layout.cpp"],
Expand Down
2 changes: 1 addition & 1 deletion runtime/core/tensor_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Result<size_t> calculate_nbytes(
}
} // namespace

Result<TensorLayout> TensorLayout::create(
Result<const TensorLayout> TensorLayout::create(
Span<const int32_t> sizes,
Span<const uint8_t> dim_order,
executorch::aten::ScalarType scalar_type) {
Expand Down
2 changes: 1 addition & 1 deletion runtime/core/tensor_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ET_EXPERIMENTAL TensorLayout final {
* @param[in] scalar_type The scalar type of the tensor.
* @return A Result containing the TensorLayout on success, or an error.
*/
static executorch::runtime::Result<TensorLayout> create(
static executorch::runtime::Result<const TensorLayout> create(
Span<const int32_t> sizes,
Span<const uint8_t> dim_order,
executorch::aten::ScalarType scalar_type);
Expand Down
Loading