Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for TFE_OpSetDevice (0.21 sec)

  1. tensorflow/c/eager/custom_device_test.cc

      ASSERT_FALSE(executed);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> matmul(
          MatMulOp(context, hcpu, hdevice), TFE_DeleteOp);
      TFE_OpSetDevice(matmul.get(), name, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      TFE_TensorHandle* retval;
      int num_retvals = 1;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  2. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

      // API.
      std::string no_sharing = "cd2c89b7-88b7-44c8-ad83-06c2a9158347";
      TFE_OpSetAttrString(op.get(), "shared_name", no_sharing.c_str(),
                          no_sharing.length());
      TFE_OpSetDevice(op.get(), device, status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_TensorHandle* var_handle = nullptr;
      int num_retvals = 1;
      TFE_Execute(op.get(), &var_handle, &num_retvals, status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api_cluster_test.cc

                                     const char* local_device_name) {
      TF_Status* status = TF_NewStatus();
      TFE_TensorHandle* h0_task0 = TestMatrixTensorHandle(ctx);
    
      TFE_Op* matmul = MatMulOp(ctx, h0_task0, h0_task0);
      TFE_OpSetDevice(matmul, remote_device_name, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      TFE_TensorHandle* retvals[1];
      int num_retvals = 1;
      TFE_Execute(matmul, &retvals[0], &num_retvals, status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Apr 14 10:03:59 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_remote_test_util.cc

      }
      if (remote) {
        TFE_OpSetDevice(matmul, task1_name, status);
        ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
      } else if (!async) {
        // Set the local device to CPU to easily validate mirroring
        string cpu_device_name;
        ASSERT_TRUE(GetDeviceName(ctx, &cpu_device_name, "CPU"));
        TFE_OpSetDevice(matmul, cpu_device_name.c_str(), status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Dec 11 22:56:03 GMT 2020
    - 9.1K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_remote_test.cc

      auto* h1_task1 =
          TFE_TensorHandleCopyToDevice(h1_task0, ctx, remote_device_name, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      TFE_Op* matmul = MatMulOp(ctx, h0_task1, h1_task1);
      TFE_OpSetDevice(matmul, remote_device_name, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    
      TFE_TensorHandle* retvals[1];
      int num_retvals = 1;
      TFE_Execute(matmul, &retvals[0], &num_retvals, status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 12 00:14:22 GMT 2020
    - 5.4K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_test.cc

        TFE_Op* matmul = MatMulOp(ctx, hcpu, hgpu);
        if (cpu_op) {
          string cpu_device_name;
          ASSERT_TRUE(GetDeviceName(ctx, &cpu_device_name, "CPU"));
          TFE_OpSetDevice(matmul, cpu_device_name.c_str(), status.get());
        } else {
          TFE_OpSetDevice(matmul, gpu_device_name.c_str(), status.get());
        }
        ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
    
        TFE_TensorHandle* retvals[1];
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  7. tensorflow/c/eager/parallel_device/parallel_device_test.cc

        if (TF_GetCode(status.get()) != TF_OK) return;
        TFE_OpSetAttrInt(op.get(), "num_replicas", 1);
        TFE_OpAddInput(op.get(), value_one.get(), status.get());
        if (TF_GetCode(status.get()) != TF_OK) return;
        TFE_OpSetDevice(op.get(), device_name, status.get());
        if (TF_GetCode(status.get()) != TF_OK) return;
    
        TFE_TensorHandle* result_handles;
        int num_retvals = 1;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 29.3K bytes
    - Viewed (1)
  8. tensorflow/c/eager/parallel_device/parallel_device_testlib.h

      TFE_OpSetAttrInt(op.get(), "N", num_replicas);
      for (int i = 0; i < num_replicas; ++i) {
        TFE_OpAddInput(op.get(), components[i], status);
        if (TF_GetCode(status) != TF_OK) return nullptr;
      }
      TFE_OpSetDevice(op.get(), device, status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
    
      TFE_TensorHandle* result_handle;
      int num_retvals = 1;
      TFE_Execute(op.get(), &result_handle, &num_retvals, status);
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Feb 09 01:12:35 GMT 2021
    - 6.9K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_test_util.cc

      TFE_OpSetAttrShape(op, "shape", {}, 0, status);
      TFE_OpSetAttrString(op, "container", "localhost", 0);
      TFE_OpSetAttrString(op, "shared_name", "", 0);
      if (!device_name.empty()) {
        TFE_OpSetDevice(op, device_name.c_str(), status);
      }
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_TensorHandle* var_handle = nullptr;
      int num_retvals = 1;
      TFE_Execute(op, &var_handle, &num_retvals, status);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  10. tensorflow/c/eager/custom_device_testutil.cc

      const TFE_OpAttrs* attributes = TFE_OpGetAttrs(original_op);
    
      TFE_Op* op(TFE_NewOp(context, operation_name, s));
      if (TF_GetCode(s) != TF_OK) return;
      TFE_OpAddAttrs(op, attributes);
      TFE_OpSetDevice(op, dev->underlying_device.c_str(), s);
      if (TF_GetCode(s) != TF_OK) return;
      int num_inputs = TFE_OpGetFlatInputCount(original_op, s);
      if (TF_GetCode(s) != TF_OK) return;
      for (int j = 0; j < num_inputs; ++j) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Mar 03 20:47:31 GMT 2021
    - 8.3K bytes
    - Viewed (0)
Back to top