v4.3 tag release update. (#2789)

This commit is contained in:
Junkai-Wu
2025-11-20 20:49:44 -05:00
committed by GitHub
parent 406e078b29
commit 8cd5bef43a
225 changed files with 23229 additions and 2813 deletions
+21
View File
@@ -75,6 +75,27 @@ DeviceAllocation *DeviceContext::allocate_tensor(
return allocation;
}
/// creates a reference tensor of existing ptr, a given type, capacity (elements), and name
DeviceAllocation *DeviceContext::create_ref_tensor(
Options const &options,
std::string const &name,
library::NumericTypeID type,
library::LayoutTypeID layout_id,
std::vector<int> const &extent,
std::vector<int64_t> const &stride,
void* ref_pointer_,
int batch_count,
size_t device_index) {
int device = options.device.device_id(device_index);
device_memory_.emplace_back(type, layout_id, extent, stride, ref_pointer_, batch_count,
device);
DeviceAllocation *allocation = &device_memory_.back();
allocations_[name] = allocation;
return allocation;
}
static void initialize_allocation_with_data_distribution(
Options const &options,
int seed_shift,