Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for value_str (0.22 sec)

  1. tensorflow/c/tf_status_helper.cc

      status.ForEachPayload(
          [tf_status](absl::string_view key, const absl::Cord& value) {
            std::string key_str(key);
            std::string value_str(value);
            TF_SetPayload(tf_status, key_str.c_str(), value_str.c_str());
          });
    }
    
    absl::Status StatusFromTF_Status(const TF_Status* tf_status) {
      absl::Status status(StatusCodeFromTSLCode(TF_GetCode(tf_status)),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      // Caller is responsible to call `TF_DeleteBuffer` to release the buffer.
      TF_Buffer* result = TF_NewBuffer();
      const std::string& value_str = *value;
      void* data = malloc(value_str.length());
      value_str.copy(static_cast<char*>(data), value_str.length(), 0);
      result->data = data;
      result->length = value_str.length();
      result->data_deallocator = [](void* data, size_t length) { free(data); };
      return result;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 05:48:24 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

      if constexpr (std::is_integral_v<T>) {
        DenseIntElementsAttr value_attr;
        if (!matchPattern(value, m_Constant(&value_attr)) ||
            !value_attr.isSplat()) {
          return false;
        }
        splat_value = value_attr.getSplatValue<T>();
        return true;
      }
    
      DenseFPElementsAttr value_attr;
      if (!matchPattern(value, m_Constant(&value_attr)) || !value_attr.isSplat()) {
        return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc

          // Convert values.
          std::vector<Eigen::half> new_values;
          const DenseFPElementsAttr value_attr =
              mlir::cast<DenseFPElementsAttr>(op.getValue());
          new_values.reserve(value_attr.getNumElements());
    
          for (const float value : value_attr.getValues<float>()) {
            new_values.push_back(Eigen::half(
                std::min(std::max(value, kMinFloat16Value), kMaxFloat16Value)));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc

            cast<mlir::stablehlo::ConstantOp>(op.getOperand().getDefiningOp());
    
        const auto value_attr =
            mlir::cast<DenseFPElementsAttr>(const_op.getValue());
        const ArrayRef<int64_t> original_shape =
            value_attr.getShapedType().getShape();
    
        const SmallVector<float> original_values =
            llvm::to_vector(value_attr.getValues<float>());
    
        // Fold the constant value by transposing the values according to the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

          // Cast values
          std::vector<Eigen::half> new_values;
          DenseFPElementsAttr value_attr =
              mlir::cast<DenseFPElementsAttr>(op.getValue());
          new_values.reserve(value_attr.getNumElements());
    
          constexpr float kMaxFloat16Value = 65504.f;
          constexpr float kMinFloat16Value = -65504.f;
    
          for (auto value : value_attr.template getValues<float>()) {
            new_values.push_back(Eigen::half(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

        mlir::Builder b(expected_ty.getContext());
        Tensor tensor(dtype, TensorShape({static_cast<int64_t>(values.size())}));
        tensor.flat<T>().setValues(values);
    
        auto value_or = ConvertTensor(tensor, &b);
        TF_ASSERT_OK(value_or.status());
        auto attr = value_or.value();
    
        EXPECT_EQ(attr.getShapedType().getElementType(), expected_ty);
    
        Tensor out;
        TF_ASSERT_OK(ConvertToTensor(attr, &out));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

          converted_attrs.push_back(attr);
        } else if (attr.getName() == op.getPaddingAttrName()) {
          auto value_or = ConvertPaddingAttr(op, dnums, rewriter);
          if (failed(value_or)) {
            return failure();
          }
          attr.setValue(*value_or);
          converted_attrs.push_back(attr);
        } else if (attr.getName() == op.getWindowStridesAttrName() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/tf_tfl_passes.cc

          quant_specs.default_ranges.second.has_value()) {
        pass_manager.addNestedPass<mlir::func::FuncOp>(
            mlir::TFL::CreateDefaultQuantParamsPass(
                quant_specs.default_ranges.first.value_or(0.0),
                quant_specs.default_ranges.second.value_or(0.0),
                quant_specs.IsSignedInferenceType()));
      }
      pass_manager.addNestedPass<mlir::func::FuncOp>(
          mlir::TFL::CreateQuantizePass(quant_specs));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 18:45:51 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

        if (!const_op) return std::nullopt;
    
        auto value_attr = const_op.getValue().dyn_cast<DenseIntElementsAttr>();
        if (!value_attr || value_attr.getNumElements() != 1) return std::nullopt;
    
        auto value_ty = value_attr.getType();
        if (!value_ty.hasRank() || value_ty.getRank() != expected_rank)
          return std::nullopt;
    
        auto splat = value_attr.getSplatValue<IntegerAttr>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
Back to top