Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 117 for get_attr (0.17 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

            graph_func.getLoc(),
            graph_func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                .getValue(),
            ftype);
    
        func->setAttrs(graph_func->getAttrs());
    
        llvm::SmallVector<Type> arg_types;
        llvm::SmallVector<Type> res_types;
        llvm::SmallVector<DictionaryAttr> arg_attrs;
        llvm::SmallVector<DictionaryAttr> res_attrs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go

    	Field               fields.Selector
    	GetAttrs            AttrFunc
    	IndexLabels         []string
    	IndexFields         []string
    	Limit               int64
    	Continue            string
    	AllowWatchBookmarks bool
    }
    
    // Matches returns true if the given object's labels and fields (as
    // returned by s.GetAttrs) match s.Label and s.Field. An error is
    // returned if s.GetAttrs fails.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

      LogicalResult matchAndRewrite(TF::CustomAggregatorOp op,
                                    PatternRewriter &rewriter) const override {
        FloatAttr min = mlir::dyn_cast_or_null<FloatAttr>(op->getAttr("min"));
        FloatAttr max = mlir::dyn_cast_or_null<FloatAttr>(op->getAttr("max"));
    
        // When there are no min and max attributes, remove op.
        if (min == nullptr || max == nullptr) {
          op.getOutput().replaceAllUsesWith(op.getInput());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

        if (auto float_attr = mlir::dyn_cast_or_null<FloatAttr>(attr.second)) {
          fbb.Float(attr.first.data(), float_attr.getValue().convertToFloat());
        } else if (auto int_attr =
                       mlir::dyn_cast_or_null<IntegerAttr>(attr.second)) {
          fbb.Int(attr.first.data(), int_attr.getInt());
        } else if (auto bool_attr = mlir::dyn_cast_or_null<BoolAttr>(attr.second)) {
          fbb.Bool(attr.first.data(), bool_attr.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      auto operands = llvm::to_vector<4>(op->getOperands());
      operands.push_back(operand);
      auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(),
                                         operands, attr.getAttrs());
      op->replaceAllUsesWith(new_op.getOperation()->getResults());
      op->erase();
      return new_op;
    }
    
    // Returns success if the function has at most one op of the template type and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

      LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
        // removeAttr will return nullptr if no attribute was removed.
        if (!call_op->removeAttr(kQuantTraitAttrName) || !f_attr) {
          return failure();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/kernels/xla_ops.cc

                            ctx->GetAttr("Tconstants", &constant_types));
      std::vector<int> constants(constant_types.size());
      std::iota(constants.begin(), constants.end(), 0);
      return constants;
    }
    
    std::vector<int> ResourcesVector(OpKernelConstruction* ctx) {
      DataTypeVector constant_types;
      OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(),
                            ctx->GetAttr("Tconstants", &constant_types));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

      auto* defining_op = op->getOperand(operand_index).getDefiningOp();
      for (auto attr : kQuantizationAxisAttrs) {
        if (defining_op->hasAttr(attr)) {
          return defining_op->getAttr(attr);
        }
      }
      // Not found.
      return rewriter.getI64IntegerAttr(-1);
    }
    
    LogicalResult CheckIfAttrIs8Bit(const std::string& attr, Operation* op,
                                    bool& is_8_bit) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  9. tensorflow/c/kernels.cc

        cc_type v;                                                                 \
        auto* cc_ctx = reinterpret_cast<::tensorflow::OpKernelConstruction*>(ctx); \
        absl::Status s = cc_ctx->GetAttr(attr_name, &v);                           \
        ::tensorflow::Set_TF_Status_from_Status(status, s);                        \
        if (s.ok()) {                                                              \
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 36K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc

    TF::ConstOp GetI64ConstantTensor(PatternRewriter &rewriter,
                                     ArrayRef<int64_t> values, Location location) {
      auto cst_attr = rewriter.getI64TensorAttr(values);
      return rewriter.create<TF::ConstOp>(location, cst_attr.getType(), cst_attr);
    }
    
    // Rewrites broadcast->reshape to a reshape->broadcast that reduces
    // the rank of the input and output of the broadcast.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top