| 76 | } // anonymous namespace |
| 77 | |
| 78 | TEST(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 | |
| 89 | TEST(TestTensorStorage, CopyFromFixLayoutImage2DPack4TensorFormat) { |
| 90 | CompNode cn = CompNode::load("xpu0"); |
nothing calls this directly
no test coverage detected