MCPcopy Create free account
hub / github.com/apache/tvm-ffi / TEST

Function TEST

tests/cpp/extra/test_c_env_api.cc:62–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62TEST(CEnvAPI, TVMFFIEnvSetDLPackManagedTensorAllocator) {
63 auto old_allocator = TVMFFIEnvGetDLPackManagedTensorAllocator();
64 DLPackManagedTensorAllocator pre_allocator;
65 TVMFFIEnvSetDLPackManagedTensorAllocator(TestDLPackManagedTensorAllocator, 0, &pre_allocator);
66 EXPECT_EQ(old_allocator, pre_allocator);
67 TVMFFIEnvSetDLPackManagedTensorAllocator(old_allocator, 0, nullptr);
68}
69
70TEST(CEnvAPI, TVMFFIEnvTensorAlloc) {
71 auto old_allocator = TVMFFIEnvGetDLPackManagedTensorAllocator();

Callers

nothing calls this directly

Calls 15

DLDataTypeClass · 0.85
DLDeviceClass · 0.85
TVMFFIHandleInitOnceFunction · 0.85
TVMFFIHandleDeinitOnceFunction · 0.85
use_countMethod · 0.45
sizeMethod · 0.45
shapeMethod · 0.45
dtypeMethod · 0.45
deviceMethod · 0.45
data_ptrMethod · 0.45

Tested by

no test coverage detected