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

Function GetDevice

oneflow/core/framework/instructions_builder.cpp:687–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685namespace {
686
687Maybe<Symbol<Device>> GetDevice(const std::shared_ptr<one::LocalTensor>& tensor) {
688 return tensor->device(); // return Maybe<Symbol<Device>>
689}
690
691Maybe<Symbol<Device>> GetDevice(const one::EagerLocalTensorImpl* tensor) {
692 return tensor->device(); // return const Symbol<Device>&

Callers 1

GetAccessStreamFunction · 0.85

Calls 1

deviceMethod · 0.45

Tested by

no test coverage detected