Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for TF_SetDevice (0.17 sec)

  1. tensorflow/c/c_test_util.cc

      // TODO(iga): Convert all these helpers and tests to use floats because
      // they are usually available on GPUs. After doing this, remove TF_SetDevice
      // call in c_api_function_test.cc
      TF_SetDevice(desc, "/cpu:0");
      *op = TF_FinishOperation(desc, s);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      ASSERT_NE(*op, nullptr);
    }
    
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Fri Oct 15 03:16:52 UTC 2021
    - 17.8K bytes
    - Viewed (0)
  2. tensorflow/c/c_api.h

    TF_CAPI_EXPORT extern TF_OperationDescription* TF_NewOperation(
        TF_Graph* graph, const char* op_type, const char* oper_name);
    
    // Specify the device for `desc`.  Defaults to empty, meaning unconstrained.
    TF_CAPI_EXPORT extern void TF_SetDevice(TF_OperationDescription* desc,
                                            const char* device);
    
    // The calls to TF_AddInput and TF_AddInputList must match (in number,
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Thu Oct 26 21:08:15 UTC 2023
    - 82.3K bytes
    - Viewed (0)
  3. tensorflow/c/c_api_function_test.cc

        for (auto input : inputs) {
          TF_AddInput(desc, input);
        }
        // Set device to CPU because some ops inside the function might not be
        // available on GPU.
        TF_SetDevice(desc, "/cpu:0");
        *op = TF_FinishOperation(desc, s_);
        ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
        ASSERT_NE(*op, nullptr);
      }
    
      FunctionDef fdef() {
        tensorflow::FunctionDef fdef;
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Thu Jul 20 22:08:54 UTC 2023
    - 63.6K bytes
    - Viewed (0)
  4. tensorflow/c/c_api.cc

                                             const char* oper_name) {
      mutex_lock l(graph->mu);
      return TF_NewOperationLocked(graph, op_type, oper_name);
    }
    
    void TF_SetDevice(TF_OperationDescription* desc, const char* device) {
      desc->node_builder.Device(device);
    }
    
    void TF_AddInput(TF_OperationDescription* desc, TF_Output input) {
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Sat Oct 12 16:27:48 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_test.cc

        TF_TString_Copy(&data[i], source.c_str(), source.length());
      }
    
      TF_DeleteTensor(t);
    }
    
    }  // namespace
    }  // namespace tensorflow
    
    // TODO(josh11b): Test:
    // * TF_SetDevice(desc, "/job:worker");
    // * control inputs / outputs
    // * targets
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Sat Oct 12 16:27:48 UTC 2024
    - 97K bytes
    - Viewed (0)
Back to top