MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TFE_OpGetDevice

Function TFE_OpGetDevice

tensorflow/c/eager/c_api.cc:633–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

631}
632
633const char* TFE_OpGetDevice(TFE_Op* op, TF_Status* status) {
634 tensorflow::Device* device = (op->operation.Device() == nullptr)
635 ? op->operation.EagerContext()->HostCPU()
636 : op->operation.Device();
637 return device->name().c_str();
638}
639
640void TFE_OpSetXLACompilation(TFE_Op* op, unsigned char enable) {
641 op->operation.SetUseXla(enable);

Callers 1

SetAndGetOpDevicesFunction · 0.85

Calls 5

HostCPUMethod · 0.80
c_strMethod · 0.80
nameMethod · 0.65
DeviceMethod · 0.45
EagerContextMethod · 0.45

Tested by 1

SetAndGetOpDevicesFunction · 0.68