Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 1,338 for Auto (0.08 sec)

  1. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

        // argument in the list.
        auto arg = bb.getArgument(0);
    
        auto remove_quantize_op = [&](QuantizeOp quantize_op) {
          auto quantize_output = quantize_op.getOutput();
          auto quantize_type = quantize_output.getType();
          input_types.push_back(quantize_type);
          auto new_arg = bb.addArgument(quantize_type, loc);
          quantize_output.replaceAllUsesWith(new_arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

              auto dq_arg_type = dq_op.getArg().getType().cast<TensorType>();
              auto qtype = dq_arg_type.getElementType().cast<QuantizedType>();
              auto scast_op = rewriter.create<quantfork::StorageCastOp>(
                  dq_op->getLoc(), dq_arg_type.clone(qtype.getStorageType()),
                  dq_op.getArg());
              inputs.push_back(scast_op.getResult());
            } else if (!elem_type.isF32()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc

      llvm::SmallVector<int32_t> result_shape_i32;
      auto result_shape = result_ty.getShape();
      for (auto element : result_shape) {
        result_shape_i32.push_back(static_cast<int32_t>(element));
      }
      auto result_shape_attr = builder.getI32TensorAttr(result_shape_i32);
      Value result_shape_tensor =
          builder.create<stablehlo::ConstantOp>(result_shape_attr);
      auto custom_code =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/passes/decompose.cc

        llvm::SmallVector<Value, 4> new_operands;
        for (auto arg : llvm::enumerate(compose_func_type.getInputs())) {
          if (auto tensor_type = mlir::dyn_cast<TFRTensorType>(arg.value())) {
            auto casted = builder.create<CastOp>(op->getLoc(), tensor_type,
                                                 op->getOperand(arg.index()));
            new_operands.push_back(casted);
          } else if (auto list_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_hashtable_ops_as_args.cc

      auto function_uses =
          SymbolTable::getSymbolUses(target_func, &module_op.getBodyRegion());
      for (auto& function_use : function_uses.value()) {
        auto call_op = function_use.getUser();
        auto caller_func = call_op->getParentOfType<func::FuncOp>();
        if (!caller_func) return failure();
    
        builder.setInsertionPoint(call_op);
        for (auto [lifted_op, arg_idx] : lifted_op_and_arg_idx) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

      // shaped tensors in the function.
      for (auto arg : func_op.getArguments()) {
        if (!mlir::isa<mlir::TensorType>(arg.getType())) continue;
        auto type = mlir::cast<mlir::TensorType>(arg.getType());
        if (type.hasRank()) {
          max_arg_size_ = std::max(max_arg_size_, GetRankedTensorSize(type));
        }
      }
    }
    
    void CostAnalysis::AnalyzeBlock(mlir::Block* block) {
      for (auto& op : *block) {
        EvaluateCost(&op);
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_serialization.cc

          return WalkResult::advance();
        }
    
        auto backend_config =
            op->getAttrOfType<DictionaryAttr>(kTfBackendConfigAttrName);
        if (!backend_config) {
          op->emitOpError() << "is missing attribute '" << kTfBackendConfigAttrName
                            << "'";
          return WalkResult::interrupt();
        }
        auto called_func = mlir::dyn_cast_or_null<SymbolRefAttr>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

    }
    
    // Checks if an operation of the tf_executor dialect can have TPU devices
    // propagated through.
    bool IsSupportedExecutorOp(Operation& op) {
      auto ops_have_same_device = [](Operation* lhs, Operation* rhs) {
        auto lhs_device_attr = lhs->getAttrOfType<StringAttr>(kDeviceAttr);
        auto rhs_device_attr = rhs->getAttrOfType<StringAttr>(kDeviceAttr);
        return (!lhs_device_attr && !rhs_device_attr) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

        llvm::SmallVectorImpl<std::string>* var_handle_shared_names) {
      Block& block = function.front();
      auto func_type = function.getFunctionType();
    
      auto func_arg_types = llvm::to_vector<4>(func_type.getInputs());
      llvm::SmallDenseMap<llvm::StringRef, int> var_arg_index_by_name;
      for (auto var_handle_op :
           llvm::make_early_inc_range(block.getOps<TF::VarHandleOp>())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

        // (element type of) the expressed type.
        if (auto quantizedType = mlir::dyn_cast<QuantizedType>(spec))
          return quantizedType.isCompatibleExpressedType(expressed);
    
        if (auto tensorType = mlir::dyn_cast<TensorType>(expressed))
          return spec == tensorType.getElementType();
    
        if (auto vectorType = mlir::dyn_cast<VectorType>(expressed))
          return spec == vectorType.getElementType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top