ort-candle 0.4.1+0.11.0

ort + candle = 🦀 - An alternative backend for ort, powered by candle.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use ort::memory::{AllocationDevice, Allocator, DeviceType};

#[test]
fn test_memory_info_apis() {
	ort::set_api(ort_candle::api());

	let allocator = Allocator::default();

	let memory_info = allocator.memory_info();
	assert_eq!(memory_info.allocation_device(), AllocationDevice::CPU);
	assert_eq!(memory_info.device_type(), DeviceType::CPU);
	assert_eq!(memory_info.device_id(), 0);

	let memory_info_clone = memory_info.clone();
	assert_eq!(memory_info, &memory_info_clone);
}