Introduce backend config for subtensor
CPU and ACL backend are not support subtensor yet
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
virtual std::string id() override { return "acl_cl"; }
virtual void initialize() override;
virtual graph::operand::Layout getOperandLayout() { return graph::operand::Layout::NCHW; }
+ virtual bool SupportSubTensorAlloc() override
+ {
+ // NOTE ACL allocator cannot support subtensor allocation yet
+ return false;
+ }
};
} // namespace acl_cl
virtual std::string id() override { return "cpu"; }
virtual void initialize() override;
virtual graph::operand::Layout getOperandLayout() { return graph::operand::Layout::NHWC; }
+ virtual bool SupportSubTensorAlloc() override
+ {
+ // NOTE CPU allocator cannot support subtensor allocation yet
+ return false;
+ }
};
} // namespace cpu
virtual void initialize() = 0;
// NOTE Assume backend has only one type of operand layout
virtual graph::operand::Layout getOperandLayout() = 0;
+ // Support subtensor allocation
+ virtual bool SupportSubTensorAlloc() = 0;
};
} // namespace backend