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

Function TFE_ContextSetServerDef

tensorflow/c/eager/c_api.cc:427–445  ·  view source on GitHub ↗

Set server_def on the context, possibly updating it.

Source from the content-addressed store, hash-verified

425
426// Set server_def on the context, possibly updating it.
427TF_CAPI_EXPORT extern void TFE_ContextSetServerDef(TFE_Context* ctx,
428 int keep_alive_secs,
429 const void* proto,
430 size_t proto_len,
431 TF_Status* status) {
432#if defined(IS_MOBILE_PLATFORM)
433 status->status = tensorflow::errors::Unimplemented(
434 "TFE_ContextSetServerDef not supported on mobile");
435#else // !defined(IS_MOBILE_PLATFORM)
436 tensorflow::ServerDef server_def;
437 if (!server_def.ParseFromArray(proto, proto_len)) {
438 status->status = tensorflow::errors::InvalidArgument(
439 "Invalid tensorflow.ServerDef protocol buffer");
440 return;
441 }
442 status->status =
443 UpdateTFE_ContextWithServerDef(keep_alive_secs, server_def, ctx);
444#endif // !IS_MOBILE_PLATFORM
445}
446
447void TFE_ContextSetThreadLocalDevicePlacementPolicy(
448 TFE_Context* ctx, TFE_ContextDevicePlacementPolicy policy) {

Calls 3

UnimplementedFunction · 0.85
InvalidArgumentFunction · 0.85