MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / TEST

Function TEST

src/core/test/tensor.cpp:78–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76} // anonymous namespace
77
78TEST(TestTensorStorage, InvalidAlloc) {
79 {
80 TensorStorage<HostTensorStorageTrait> storage;
81 EXPECT_THROW(storage.ensure_size(100), MegBrainError);
82 }
83 {
84 TensorStorage<DeviceTensorStorageTrait> storage;
85 EXPECT_THROW(storage.ensure_size(100), MegBrainError);
86 }
87}
88
89TEST(TestTensorStorage, CopyFromFixLayoutImage2DPack4TensorFormat) {
90 CompNode cn = CompNode::load("xpu0");

Callers

nothing calls this directly

Calls 15

TensorLayoutClass · 0.85
TensorShapeClass · 0.85
SliceClass · 0.85
dump_tensorFunction · 0.85
output_fileFunction · 0.85
copy_from_fixlayoutMethod · 0.80
device_wait_eventMethod · 0.80
resizeMethod · 0.80
offset_elemMethod · 0.80
makeFunction · 0.70
loadFunction · 0.50
genFunction · 0.50

Tested by

no test coverage detected