Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for type (0.19 sec)

  1. tensorflow/c/eager/dlpack.cc

      owner->reference.Unref();
      delete owner;
    }
    
    // Converts TF_DATAType to DLPack data type.
    DLDataType GetDlDataType(TF_DataType data_type, TF_Status* status) {
      DLDataType dtype;
      dtype.lanes = 1;
      dtype.bits = TF_DataTypeSize(data_type) * 8;
      switch (data_type) {
        case TF_DataType::TF_BOOL:
          dtype.code = DLDataTypeCode::kDLBool;
          break;
        case TF_DataType::TF_HALF:
        case TF_DataType::TF_FLOAT:
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  2. tensorflow/c/eager/gradients.cc

        input_ids[i] = ToId(inputs[i]);
        input_dtypes[i] = inputs[i]->DataType();
      }
      std::vector<TapeTensor> tape_tensors;
      tape_tensors.reserve(outputs.size());
      for (auto t : outputs) {
        tape_tensors.push_back(TapeTensor(t));
      }
      GradientTape::RecordOperation(
          op_name, tape_tensors, input_ids, input_dtypes,
          [gradient_function]() -> GradientFunction* { return gradient_function; },
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/grappler/grappler.cc

      TF_RETURN_IF_ERROR(ValidateTPOptimizerConfigs(optimizer_configs));
    
      CGraphOptimizerRegister(
          [=]() { return new CGraphOptimizer(optimizer, params.device_type); },
          optimizer_configs, params.device_type);
    
      return absl::OkStatus();
    }
    
    }  // namespace grappler
    }  // namespace tensorflow
    
    void TF_GetNodesToPreserveListSize(const TF_GrapplerItem* item, int* num_values,
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  4. tensorflow/c/c_test_util.cc

      }
      return found_dtype && found_shape;
    }
    
    bool IsScalarConst(const tensorflow::NodeDef& node_def, int v) {
      if (node_def.op() != "Const" || node_def.name() != "scalar") {
        return false;
      }
      bool found_dtype = false;
      bool found_value = false;
      for (const auto& attr : node_def.attr()) {
        if (attr.first == "dtype") {
          if (attr.second.type() == tensorflow::DT_INT32) {
            found_dtype = true;
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  5. tensorflow/c/eager/custom_device_test.cc

      executed = false;
      TFE_Execute(matmul.get(), &retval, &num_retvals, status.get());
      EXPECT_FALSE(executed);
      ASSERT_FALSE(TF_GetCode(status.get()) == TF_OK);
    
      // Custom devices can refuse to do type-based dispatch (as hcustom1 is
      // configured to do)
      matmul.reset(MatMulOp(context.get(), hcustom1.get(), hcpu.get()));
      num_retvals = 1;
      executed = false;
    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)
  6. tensorflow/c/c_api_experimental.cc

    }
    
    TFE_TensorHandle* TFE_NewTensorHandleFromScalar(TF_DataType data_type,
                                                    void* data, size_t len,
                                                    TF_Status* status) {
      auto dtype = static_cast<tensorflow::DataType>(data_type);
      DCHECK(tensorflow::DataTypeCanUseMemcpy(dtype));
    
      tensorflow::Tensor tensor(dtype, tensorflow::TensorShape({}));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/next_pluggable_device/c_api.cc

          tensorflow::DeviceType(device_type), std::move(*pjrt_client));
      status->status = s;
    }
    
    void TF_ResetPjRtCClient(const char* device_type, TF_Status* status) {
      status->status =
          tensorflow::ResetPjRtClient(tensorflow::DeviceType(device_type));
    }
    
    PJRT_Client* TF_GetPjRtCClient(const char* device_type, TF_Status* status) {
      absl::StatusOr<xla::PjRtCApiClient*> pjrt_c_api_client =
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jan 09 00:52:04 GMT 2024
    - 13.9K bytes
    - Viewed (1)
  8. tensorflow/c/eager/c_api_distributed_test.cc

          "      attr {"
          "        key: 'dtype'"
          "        value {"
          "          type: DT_FLOAT"
          "        }"
          "      }"
          "    }"
          "    node_def {"
          "      name: 'read1'"
          "      op: 'ReadVariableOp'"
          "      input: 'var'"
          "      device: '/job:localhost/replica:0/task:1/device:CPU:0'"
          "      attr {"
          "        key: 'dtype'"
          "        value {"
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/grappler/grappler_test.cc

        TF_SetStatus(status, TF_OK, "");
        PopulateDefaultParam(params);
        params->device_type = "Device0";
      };
      auto plugin_init_1 = [](TP_OptimizerRegistrationParams* const params,
                              TF_Status* const status) -> void {
        TF_SetStatus(status, TF_OK, "");
        PopulateDefaultParam(params);
        params->device_type = "Device1";
      };
    
      TF_ASSERT_OK(InitGraphPlugin(plugin_init_0));
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Apr 13 22:30:58 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  10. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    Variable* Variable::Create(TFE_Context* context, TF_DataType type,
                               const int64_t* dims, const int num_dims,
                               const char* device, TF_Status* status) {
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context, "VarHandleOp", status), TFE_DeleteOp);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op.get(), "dtype", type);
    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)
Back to top