Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TFE_ContextSetThreadLocalDevicePlacementPolicy (0.33 sec)

  1. tensorflow/c/eager/c_api.h

    // instead of the device policy used to construct the context. This has no
    // effect on the device policy used by other program threads.
    TF_CAPI_EXPORT extern void TFE_ContextSetThreadLocalDevicePlacementPolicy(
        TFE_Context* ctx, TFE_ContextDevicePlacementPolicy policy);
    
    // Returns the device placement policy to be used by this context in the current
    // thread.
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Thu Apr 27 21:07:00 UTC 2023
    - 22.8K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api.cc

      status->status = tensorflow::OkStatus();
    #else   // !defined(IS_MOBILE_PLATFORM)
      status->status = tensorflow::unwrap(ctx)->AsyncWait();
    #endif  // !IS_MOBILE_PLATFORM
    }
    
    void TFE_ContextSetThreadLocalDevicePlacementPolicy(
        TFE_Context* ctx, TFE_ContextDevicePlacementPolicy policy) {
      tensorflow::unwrap(ctx)->SetThreadLocalDevicePlacementPolicy(
          static_cast<tensorflow::ContextDevicePlacementPolicy>(policy));
    }
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Sat Oct 12 05:11:17 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_test.cc

      TFE_ContextOptionsSetDevicePlacementPolicy(opts, global_policy);
      TFE_Context* ctx = TFE_NewContext(opts, status.get());
      if (thread_policy != global_policy) {
        TFE_ContextSetThreadLocalDevicePlacementPolicy(ctx, thread_policy);
      }
      TFE_DeleteContextOptions(opts);
      ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
    
      TFE_TensorHandle* hcpu = TestMatrixTensorHandle(ctx);
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Thu Aug 03 20:50:20 UTC 2023
    - 94.6K bytes
    - Viewed (0)
Back to top