Skip to content
Merged
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: 8 additions & 0 deletions src/runtime/memory/memory_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ NDArray StorageObj::AllocNDArray(size_t offset, ShapeTuple shape, DLDataType dty
// buffer intact.
container->manager_ctx = reinterpret_cast<void*>(this);

if (this->buffer.device.device_type == kDLHexagon) {
// For Hexagon, non-zero offset support simply requires adjusting the
// beginning of data pointer
auto offset_ptr = reinterpret_cast<uint8_t*>(this->buffer.data) + offset;
container->dl_tensor.data = reinterpret_cast<void*>(offset_ptr);
container->dl_tensor.byte_offset = 0;
}

NDArray ret(GetObjectPtr<Object>(container));
// RAII in effect, now run the check.

Expand Down