MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ConvertToTensorTuple

Function ConvertToTensorTuple

oneflow/api/cpp/framework/graph.cpp:90–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88};
89
90std::shared_ptr<of::one::TensorTuple> ConvertToTensorTuple(
91 const std::vector<std::shared_ptr<of::one::Tensor>>& tensors) {
92 auto tensor_tuple = std::make_shared<of::one::TensorTuple>();
93 for (const auto& tensor : tensors) { tensor_tuple->emplace_back(tensor); }
94 return tensor_tuple;
95}
96
97std::string GetDeviceTag(const Device& device) { return device.type(); }
98

Callers 1

RegisterTensorsMethod · 0.85

Calls 1

emplace_backMethod · 0.45

Tested by

no test coverage detected