| 267 | /* ===================== SharedDeviceTensor related ===================== */ |
| 268 | |
| 269 | intl::SharedDeviceTensorBase::SharedDeviceTensorBase( |
| 270 | ComputingGraph& graph, const std::shared_ptr<DeviceTensorND>& dev_data, |
| 271 | bool const_value, const OperatorNodeConfig& config) |
| 272 | : Super{&graph, config, "shared", {}}, |
| 273 | m_dev_data{dev_data}, |
| 274 | m_const_value(const_value) { |
| 275 | if (config.has_comp_node_set()) { |
| 276 | mgb_assert(config.get_single_comp_node() == dev_data->comp_node()); |
| 277 | } |
| 278 | add_output(dev_data->dtype()); |
| 279 | add_equivalence_component<ScalarHash<void*>>(dev_data.get()); |
| 280 | } |
| 281 | |
| 282 | const TensorShape& intl::SharedDeviceTensorBase::get_output_shape() { |
| 283 | return m_dev_data->shape(); |
nothing calls this directly
no test coverage detected